From: devilhorns Date: Thu, 17 Feb 2011 18:38:56 +0000 (+0000) Subject: Ecore_X_Image: Add trap for potential missing XImage. X-Git-Tag: build/2012-07-04.173327~1304 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=27fe92027ec3e9e4c6430b047f7e4c32c2422036;p=profile%2Fivi%2Fecore.git 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 ?) git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@57130 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/ecore_x/xlib/ecore_x_image.c b/src/lib/ecore_x/xlib/ecore_x_image.c index 151a61e..93db745 100644 --- a/src/lib/ecore_x/xlib/ecore_x_image.c +++ b/src/lib/ecore_x/xlib/ecore_x_image.c @@ -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 */