From d52b775674d278f2e930594db9e87b0d412d256d Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 18 Aug 2024 17:59:09 +0200 Subject: Fix kms capture crash on wayland if x11 is not available (always the case in the flatpak) --- src/capture/kms.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/capture/kms.c b/src/capture/kms.c index 6a8457a..eb4cac1 100644 --- a/src/capture/kms.c +++ b/src/capture/kms.c @@ -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); -- cgit v1.2.3