summaryrefslogtreecommitdiffstats
path: root/generic/tkImage.c
diff options
context:
space:
mode:
authorpatthoyts@users.sourceforge.net <patthoyts>2007-10-09 12:34:33 (GMT)
committerpatthoyts@users.sourceforge.net <patthoyts>2007-10-09 12:34:33 (GMT)
commit16b13f6bfe25181d45731605cf2661892706250f (patch)
tree6d78ff59b95ba245009f2fa1cdd59e8ac38fcbea /generic/tkImage.c
parent788cc776e0e316478ad07f5ee521b6a1bffd1de8 (diff)
downloadtk-16b13f6bfe25181d45731605cf2661892706250f.zip
tk-16b13f6bfe25181d45731605cf2661892706250f.tar.gz
tk-16b13f6bfe25181d45731605cf2661892706250f.tar.bz2
Make Ttk_GetImage safe if called with NULL interp. Added some tests
that crash on Windows without this fix.
Diffstat (limited to 'generic/tkImage.c')
-rw-r--r--generic/tkImage.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tkImage.c b/generic/tkImage.c
index 3688284..4beed34 100644
--- a/generic/tkImage.c
+++ b/generic/tkImage.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkImage.c,v 1.33 2007/09/07 00:34:52 dgp Exp $
+ * RCS: @(#) $Id: tkImage.c,v 1.34 2007/10/09 12:34:34 patthoyts Exp $
*/
#include "tkInt.h"
@@ -574,7 +574,9 @@ Tk_GetImage(
return (Tk_Image) imagePtr;
noSuchImage:
- Tcl_AppendResult(interp, "image \"", name, "\" doesn't exist", NULL);
+ if (interp) {
+ Tcl_AppendResult(interp, "image \"", name, "\" doesn't exist", NULL);
+ }
return NULL;
}