free XImages
This commit is contained in:
parent
3dc4750ea4
commit
3559312321
1 changed files with 7 additions and 1 deletions
|
@ -361,9 +361,11 @@ gboolean RrPixmapToRGBA(const RrInstance *inst,
|
|||
if (mask) {
|
||||
xm = XGetImage(RrDisplay(inst), mask,
|
||||
0, 0, mw, mh, 0xffffffff, ZPixmap);
|
||||
if (!xm)
|
||||
if (!xm) {
|
||||
XDestroyImage(xi);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
*data = g_new(RrPixel32, pw * ph);
|
||||
RrIncreaseDepth(inst, *data, xi);
|
||||
|
@ -383,5 +385,9 @@ gboolean RrPixmapToRGBA(const RrInstance *inst,
|
|||
*w = pw;
|
||||
*h = ph;
|
||||
|
||||
XDestroyImage(xi);
|
||||
if (mask)
|
||||
XDestroyImage(xm);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue