diff options
Diffstat (limited to 'nx-X11/lib/X11/CrPFBData.c')
-rw-r--r-- | nx-X11/lib/X11/CrPFBData.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nx-X11/lib/X11/CrPFBData.c b/nx-X11/lib/X11/CrPFBData.c index 57cd15303..d343420aa 100644 --- a/nx-X11/lib/X11/CrPFBData.c +++ b/nx-X11/lib/X11/CrPFBData.c @@ -66,8 +66,11 @@ Pixmap XCreatePixmapFromBitmapData( pix = XCreatePixmap(display, d, width, height, depth); gcv.foreground = fg; gcv.background = bg; - if (! (gc = XCreateGC(display, pix, GCForeground|GCBackground, &gcv))) - return (Pixmap) NULL; + gc = XCreateGC(display, pix, GCForeground|GCBackground, &gcv); + if (gc == NULL) { + XFreePixmap(display, pix); + return (Pixmap) None; + } ximage.height = height; ximage.width = width; ximage.depth = 1; |