Fix kms capture crash on wayland if x11 is not available (always the case in the flatpak)

This commit is contained in:
dec05eba
2024-08-18 17:59:09 +02:00
parent 8efc371038
commit d52b775674

View File

@@ -203,6 +203,9 @@ static void gsr_capture_kms_tick(gsr_capture *cap, AVCodecContext *video_codec_c
(void)video_codec_context;
gsr_capture_kms *self = cap->priv;
if(!self->is_x11)
return;
while(XPending(self->params.egl->x11.dpy)) {
XNextEvent(self->params.egl->x11.dpy, &self->xev);
gsr_cursor_update(&self->x11_cursor, &self->xev);