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; }