diff options
author | chengyemao <chengyemao@noemail.net> | 2001-12-07 04:17:24 (GMT) |
---|---|---|
committer | chengyemao <chengyemao@noemail.net> | 2001-12-07 04:17:24 (GMT) |
commit | 1c36aa02f5e6726c86574bead7e42f2450841d56 (patch) | |
tree | e35bd2c850d5cd71f687464a22583d2698d94476 /generic/tkImgPhoto.c | |
parent | 9900a32fdb4e5367ea63e25f2d20252bee024c33 (diff) | |
download | tk-1c36aa02f5e6726c86574bead7e42f2450841d56.zip tk-1c36aa02f5e6726c86574bead7e42f2450841d56.tar.gz tk-1c36aa02f5e6726c86574bead7e42f2450841d56.tar.bz2 |
Added panic in ImgPhotoInstanceSetSize in case of failure to get pixmap
FossilOrigin-Name: ef810a03f13b930f95126a88158de4774a73aafd
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r-- | generic/tkImgPhoto.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index 2a9d1df..59391a7 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -15,7 +15,7 @@ * Department of Computer Science, * Australian National University. * - * RCS: @(#) $Id: tkImgPhoto.c,v 1.24 2001/09/14 20:35:58 andreas_kupries Exp $ + * RCS: @(#) $Id: tkImgPhoto.c,v 1.25 2001/12/07 04:17:25 chengyemao Exp $ */ #include "tkInt.h" @@ -2534,6 +2534,10 @@ ImgPhotoInstanceSetSize(instancePtr) (masterPtr->width > 0) ? masterPtr->width: 1, (masterPtr->height > 0) ? masterPtr->height: 1, instancePtr->visualInfo.depth); + if(!newPixmap) { + panic("Fail to create pixmap with Tk_GetPixmap in ImgPhotoInstanceSetSize.\n"); + return; + } /* * The following is a gross hack needed to properly support colormaps |