diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2020-09-29 15:42:09 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2020-09-29 15:42:09 +0300 |
commit | a316025397ae9ef01adebd80bf4c2d680745b0fb (patch) | |
tree | 86e8fdce1c34e49e359c80a3ee3f0ea84fa68971 /kms++ | |
parent | 89542ab068987f24b806abf2ba0f68ed030c03b5 (diff) |
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 <tomi.valkeinen@ti.com>
Diffstat (limited to 'kms++')
-rw-r--r-- | kms++/src/plane.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<Crtc*> 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); } |