From a316025397ae9ef01adebd80bf4c2d680745b0fb Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Tue, 29 Sep 2020 15:42:09 +0300 Subject: Fix Plane::get_possible_crtcs Looks like RPi gives 0xff as possible_crtcs, even if there's only one crtc. The current code throws an exception in that case. Fix this by just ignoring non-existent possible crtcs. Signed-off-by: Tomi Valkeinen --- kms++/src/plane.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kms++/src') diff --git a/kms++/src/plane.cpp b/kms++/src/plane.cpp index 2df51c1..ffab3b5 100644 --- a/kms++/src/plane.cpp +++ b/kms++/src/plane.cpp @@ -83,7 +83,7 @@ vector Plane::get_possible_crtcs() const auto iter = find_if(crtcs.begin(), crtcs.end(), [idx](Crtc* crtc) { return crtc->idx() == idx; }); if (iter == crtcs.end()) - throw runtime_error("get_possible_crtcs: crtc missing"); + continue; v.push_back(*iter); } -- cgit v1.2.3