summaryrefslogtreecommitdiffstats
path: root/generic/tkImage.c
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2007-10-09 12:34:33 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2007-10-09 12:34:33 (GMT)
commit88f37cabad4c7f19e6b6f94fa5dba33e2562f304 (patch)
tree6d78ff59b95ba245009f2fa1cdd59e8ac38fcbea /generic/tkImage.c
parent02101584875920a2df958fa6e171cf2cb74f73be (diff)
downloadtk-88f37cabad4c7f19e6b6f94fa5dba33e2562f304.zip
tk-88f37cabad4c7f19e6b6f94fa5dba33e2562f304.tar.gz
tk-88f37cabad4c7f19e6b6f94fa5dba33e2562f304.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;
}