Ecore_X_Image: Add trap for potential missing XImage.

if Ecore_X_Image-->XImage does not exist, we call
_ecore_x_image_shm_create to create it via shm, BUT that function
can return a NULL XImage if shm is not supported, so we need to check
the return of that, else we are calling XShmPutImage with no XImage.

(NB: This should probably be backported to 1.0...if someone could
handle that please ?)



SVN revision: 57130
This commit is contained in:
Christopher Michael 2011-02-17 18:38:56 +00:00
parent c6cb315e35
commit d2dc1f438b
1 changed files with 2 additions and 1 deletions

View File

@ -292,7 +292,8 @@ ecore_x_image_put(Ecore_X_Image *im,
gc = tgc;
}
if (!im->xim) _ecore_x_image_shm_create(im);
XShmPutImage(_ecore_x_disp, draw, gc, im->xim, sx, sy, x, y, w, h, False);
if (im->xim)
XShmPutImage(_ecore_x_disp, draw, gc, im->xim, sx, sy, x, y, w, h, False);
if (tgc) ecore_x_gc_free(tgc);
} /* ecore_x_image_put */