diff options
author | culler <culler> | 2021-05-02 03:52:13 (GMT) |
---|---|---|
committer | culler <culler> | 2021-05-02 03:52:13 (GMT) |
commit | ea7932318beff09d02dfff2e9c0cf9aef442931d (patch) | |
tree | e35a3187c91d40b0d480c90262036d3c1fdefab5 /xlib | |
parent | dad9cd1095e2186936703566688f5e4f3b1caab8 (diff) | |
parent | fb33aecc60cd7d9d60572995c74fa13247f4e4ba (diff) | |
download | tk-ea7932318beff09d02dfff2e9c0cf9aef442931d.zip tk-ea7932318beff09d02dfff2e9c0cf9aef442931d.tar.gz tk-ea7932318beff09d02dfff2e9c0cf9aef442931d.tar.bz2 |
Merge 8.6
Diffstat (limited to 'xlib')
-rw-r--r-- | xlib/ximage.c | 12 |
1 files changed, 7 insertions, 5 deletions
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; } |