diff --git generic/tkImage.c generic/tkImage.c
index e76f2da4d9..96b8f4eb90 100644
--- generic/tkImage.c
+++ generic/tkImage.c
@@ -372,8 +372,17 @@ Tk_ImageObjCmd(
 	    args[objc] = NULL;
 	}
 	Tcl_Preserve(modelPtr);
+	if (oldimage) {
+	    typedef int (OldCreateProc)(Tcl_Interp *, char *, int, char **,
+		    Tk_ImageType *, Tk_ImageModel, ClientData *);
+	    i = ((OldCreateProc *)typePtr->createProc)(interp,
+		    (char *)name, objc, (char **)args, typePtr,
+		    (Tk_ImageModel)modelPtr, &modelPtr->modelData);
+	} else {
+	    i = typePtr->createProc(interp, name, objc, args, typePtr,
+		    (Tk_ImageModel)modelPtr, &modelPtr->modelData);
+	}
-	if (typePtr->createProc(interp, name, objc, args, typePtr,
-		(Tk_ImageModel)modelPtr, &modelPtr->modelData) != TCL_OK){
+	if (i != TCL_OK){
 	    EventuallyDeleteImage(modelPtr, 0);
 	    Tcl_Release(modelPtr);
 	    if (oldimage) {
