summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorericm <ericm>2002-02-03 22:33:07 (GMT)
committerericm <ericm>2002-02-03 22:33:07 (GMT)
commitc4c221ed212e46e8248635e96a58dc801e106668 (patch)
treec697e2403242e08d3ba676a87bd2a3959e70ef41 /generic
parent4ad7f3e495e1d3885d7661ae4cc2ec6cab981bf2 (diff)
downloadtk-c4c221ed212e46e8248635e96a58dc801e106668.zip
tk-c4c221ed212e46e8248635e96a58dc801e106668.tar.gz
tk-c4c221ed212e46e8248635e96a58dc801e106668.tar.bz2
Clean-up bogus for loop in [image inuse] subcommand. [Bug #485803]
Diffstat (limited to 'generic')
-rw-r--r--generic/tkImage.c10
1 files changed, 3 insertions, 7 deletions
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;