forked from e16/e16
1
0
Fork 0

Fix segv when iconifying magnifier window with CM enabled.

Patch by Daniel Manjarres.

SVN revision: 59352
This commit is contained in:
Kim Woelders 2011-05-12 18:57:02 +00:00
parent 8149f1017a
commit f118572e79
1 changed files with 7 additions and 4 deletions

View File

@ -84,12 +84,15 @@ static unsigned int
MagwinGetPixel(Drawable draw, unsigned int x, unsigned int y)
{
EImage *im;
unsigned int *pd, pixel;
unsigned int *pd, pixel = 0;
im = EImageGrabDrawable(draw, None, x, y, 1, 1, 0);
pd = (unsigned int *)EImageGetData(im);
pixel = *pd;
EImageFree(im);
if (im)
{
pd = (unsigned int *)EImageGetData(im);
pixel = *pd;
EImageFree(im);
}
return pixel;
}