mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
sys/ximage/gstximagesrc.c: Fix hypothetical crash.
Original commit message from CVS: 2006-06-29 Zaheer Abbas Merali <zaheerabbas at merali dot org> * sys/ximage/gstximagesrc.c: (gst_ximage_src_ximage_get): Fix hypothetical crash.
This commit is contained in:
parent
2657a246ea
commit
1614e03cdb
2 changed files with 10 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2006-06-29 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||
|
||||
* sys/ximage/gstximagesrc.c: (gst_ximage_src_ximage_get):
|
||||
|
||||
Fix hypothetical crash.
|
||||
|
||||
2006-06-28 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
Patch by: Brian Cameron <brian dot cameron at sun dot com>
|
||||
|
|
|
@ -479,7 +479,11 @@ gst_ximage_src_ximage_get (GstXImageSrc * ximagesrc)
|
|||
int cx, cy, i, j, count;
|
||||
|
||||
cx = ximagesrc->cursor_image->x - ximagesrc->cursor_image->xhot;
|
||||
if (cx < 0)
|
||||
cx = 0;
|
||||
cy = ximagesrc->cursor_image->y - ximagesrc->cursor_image->yhot;
|
||||
if (cy < 0)
|
||||
cy = 0;
|
||||
count = ximagesrc->cursor_image->width * ximagesrc->cursor_image->height;
|
||||
for (i = 0; i < count; i++)
|
||||
ximagesrc->cursor_image->pixels[i] =
|
||||
|
|
Loading…
Reference in a new issue