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
pull/87/head
Luca Barbato 11 years ago
parent 89fa2b5616
commit 5b9c817dc7
  1. 2
      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;

Loading…
Cancel
Save