summaryrefslogtreecommitdiffstats
path: root/generic/tkImgPhoto.c
diff options
context:
space:
mode:
authorchengyemao <chengyemao>2001-12-07 04:17:25 (GMT)
committerchengyemao <chengyemao>2001-12-07 04:17:25 (GMT)
commit6d2a269946df5ba722f1326a85bdb95d679de263 (patch)
treee35bd2c850d5cd71f687464a22583d2698d94476 /generic/tkImgPhoto.c
parent5391e66099bb89cd94887cbfa902ab96732b58f1 (diff)
downloadtk-6d2a269946df5ba722f1326a85bdb95d679de263.zip
tk-6d2a269946df5ba722f1326a85bdb95d679de263.tar.gz
tk-6d2a269946df5ba722f1326a85bdb95d679de263.tar.bz2
Added panic in ImgPhotoInstanceSetSize in case of failure to get pixmap
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r--generic/tkImgPhoto.c6
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