From 0698210ce19575f8684076a3bc73ded6347d9e25 Mon Sep 17 00:00:00 2001 From: manteuffel723 <40317957+manteuffel723@users.noreply.github.com> Date: Thu, 26 Jan 2023 17:23:44 +0100 Subject: [PATCH] Fix Error: Couldn't import RGB Image: 00003002 and 00003004 (#761) --- src/platform/linux/kmsgrab.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/platform/linux/kmsgrab.cpp b/src/platform/linux/kmsgrab.cpp index 6c0642a6..240ce696 100644 --- a/src/platform/linux/kmsgrab.cpp +++ b/src/platform/linux/kmsgrab.cpp @@ -610,9 +610,12 @@ public: for(int y = 0; y < 4; ++y) { if(!fb->handles[y]) { - // It's not clear wheter there could still be valid handles left. + // setting sd->fds[y] to a negative value indicates that sd->offsets[y] and sd->pitches[y] + // are uninitialized and contain invalid values. + sd->fds[y] = -1; + // It's not clear whether there could still be valid handles left. // So, continue anyway. - // TODO: Is this redundent? + // TODO: Is this redundant? continue; }