diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tkImage.c | 10 |
2 files changed, 8 insertions, 7 deletions
@@ -1,3 +1,8 @@ +2002-02-03 eric melski <ericm@interwoven.com> + + * generic/tkImage.c (Tk_ImageObjCmd): Clean up bogus for loop in + [image inuse] subcommand [Bug #485803]. + 2002-02-01 Jeff Hobbs <jeffh@ActiveState.com> * generic/tkCmds.c (Tk_TkObjCmd): don't use 'bool' as an arg as it diff --git a/generic/tkImage.c b/generic/tkImage.c index bdd6cc7..38275a8 100644 --- a/generic/tkImage.c +++ b/generic/tkImage.c @@ -11,7 +11,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.13 2002/01/17 05:13:11 dgp Exp $ + * RCS: @(#) $Id: tkImage.c,v 1.14 2002/02/03 22:33:07 ericm Exp $ */ #include "tkInt.h" @@ -368,12 +368,8 @@ Tk_ImageObjCmd(clientData, interp, objc, objv) return TCL_ERROR; } masterPtr = (ImageMaster *) Tcl_GetHashValue(hPtr); - if (masterPtr->typePtr != NULL) { - for (imagePtr = masterPtr->instancePtr; imagePtr != NULL; - imagePtr = imagePtr->nextPtr) { - count = 1; - break; - } + if (masterPtr->typePtr != NULL && masterPtr->instancePtr != NULL) { + count = 1; } Tcl_SetBooleanObj(Tcl_GetObjResult(interp), count); break; |