summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2014-09-11 14:28:44 +0200
committerLuca Barbato <lu_zero@gentoo.org>2014-10-04 23:46:46 +0200
commit5b9c817dc7577b6d44acc94d73b9c77c52cda489 (patch)
tree0fd4790236396c5b11808a0e58ab3f65e1769f5f
parent89fa2b5616274194d90bde0aeebf6adbd1245193 (diff)
downloadffmpeg-streaming-5b9c817dc7577b6d44acc94d73b9c77c52cda489.zip
ffmpeg-streaming-5b9c817dc7577b6d44acc94d73b9c77c52cda489.tar.gz
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
-rw-r--r--libavdevice/x11grab.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavdevice/x11grab.c b/libavdevice/x11grab.c
index ebc893b..1f91be9 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;
OpenPOWER on IntegriCloud