You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
x11grab: Check XFixesGetCursorImage return value
It could return NULL if the cursor is outside the screen, the connection timed out or the system is out of memory. CC: libav-stable@libav.org
This commit is contained in:
@@ -392,6 +392,8 @@ static void paint_mouse_pointer(XImage *image, X11GrabContext *s)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
xcim = XFixesGetCursorImage(dpy);
|
xcim = XFixesGetCursorImage(dpy);
|
||||||
|
if (!xcim)
|
||||||
|
return;
|
||||||
|
|
||||||
x = xcim->x - xcim->xhot;
|
x = xcim->x - xcim->xhot;
|
||||||
y = xcim->y - xcim->yhot;
|
y = xcim->y - xcim->yhot;
|
||||||
|
Reference in New Issue
Block a user