Index: generic/nsf.c =================================================================== diff -u -N -r545663bd9f6411c778c16a3cb2a1896f6ef29eaf -r08bf8cbe57576cf94b4cc5b1425b845c0fa82a9b --- generic/nsf.c (.../nsf.c) (revision 545663bd9f6411c778c16a3cb2a1896f6ef29eaf) +++ generic/nsf.c (.../nsf.c) (revision 08bf8cbe57576cf94b4cc5b1425b845c0fa82a9b) @@ -32907,6 +32907,10 @@ ObjTrace("CREATE", newObject); + if (autoNameCreate) { + newObject->flags |= NSF_IS_AUTONAMED; + } + /* * In case, the object is destroyed during initialization, we increment * the refCount. @@ -32917,10 +32921,6 @@ } create_method_exit: - if (autoNameCreate && result == TCL_OK && newObject != NULL) { - newObject->flags |= NSF_IS_AUTONAMED; - } - if (tmpObj != NULL) { DECR_REF_COUNT(tmpObj); }