summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
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;