diff options
Diffstat (limited to 'xlib')
-rw-r--r-- | xlib/X11/Xlib.h | 3 | ||||
-rw-r--r-- | xlib/ximage.c | 12 |
2 files changed, 7 insertions, 8 deletions
diff --git a/xlib/X11/Xlib.h b/xlib/X11/Xlib.h index 1977939..56d049c 100644 --- a/xlib/X11/Xlib.h +++ b/xlib/X11/Xlib.h @@ -330,9 +330,6 @@ typedef struct _XImage { unsigned long green_mask; unsigned long blue_mask; XPointer obdata; /* hook for the object routines to hang on */ -#if defined(MAC_OSX_TK) - int pixelpower; /* No longer used. */ -#endif struct funcs { /* image manipulation routines */ struct _XImage *(*create_image)(); #if NeedFunctionPrototypes diff --git a/xlib/ximage.c b/xlib/ximage.c index aaab946..b3a8f20 100644 --- a/xlib/ximage.c +++ b/xlib/ximage.c @@ -51,11 +51,13 @@ XCreateBitmapFromData( } ximage = XCreateImage(display, NULL, 1, XYBitmap, 0, (char*) data, width, height, 8, (width + 7) / 8); - ximage->bitmap_bit_order = LSBFirst; - _XInitImageFuncPtrs(ximage); - TkPutImage(NULL, 0, display, pix, gc, ximage, 0, 0, 0, 0, width, height); - ximage->data = NULL; - XDestroyImage(ximage); + if (ximage) { + ximage->bitmap_bit_order = LSBFirst; + _XInitImageFuncPtrs(ximage); + TkPutImage(NULL, 0, display, pix, gc, ximage, 0, 0, 0, 0, width, height); + ximage->data = NULL; + XDestroyImage(ximage); + } XFreeGC(display, gc); return pix; } |