diff options
author | patthoyts@users.sourceforge.net <patthoyts> | 2007-10-09 12:34:33 (GMT) |
---|---|---|
committer | patthoyts@users.sourceforge.net <patthoyts> | 2007-10-09 12:34:33 (GMT) |
commit | 16b13f6bfe25181d45731605cf2661892706250f (patch) | |
tree | 6d78ff59b95ba245009f2fa1cdd59e8ac38fcbea /generic/tkImage.c | |
parent | 788cc776e0e316478ad07f5ee521b6a1bffd1de8 (diff) | |
download | tk-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.c | 6 |
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; } |