diff --git a/libavdevice/x11grab.c b/libavdevice/x11grab.c index ebc893bc8a..1f91be9f29 100644 --- a/libavdevice/x11grab.c +++ b/libavdevice/x11grab.c @@ -392,6 +392,8 @@ static void paint_mouse_pointer(XImage *image, X11GrabContext *s) return; xcim = XFixesGetCursorImage(dpy); + if (!xcim) + return; x = xcim->x - xcim->xhot; y = xcim->y - xcim->yhot;