We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33a4858 commit 80e4e6fCopy full SHA for 80e4e6f
generic/itclCmd.c
@@ -1860,10 +1860,9 @@ Itcl_AddComponentCmd(
1860
Tcl_GetString(ivPtr->namePtr));
1861
hPtr = Tcl_CreateHashEntry(&contextIoPtr->objectVariables,
1862
(char *)ivPtr, &isNew);
1863
- if (isNew) {
+ if (hPtr && isNew) {
1864
Itcl_PreserveVar(varPtr);
1865
- Tcl_SetHashValue(hPtr, varPtr);
1866
- } else {
+ Tcl_SetHashValue(hPtr, varPtr);
1867
}
1868
return result;
1869
generic/itclMigrate2TclCore.c
@@ -67,7 +67,9 @@ Tcl_NewNamespaceVar(
67
68
varPtr = TclVarHashCreateVar(&((Namespace *)nsPtr)->varTable,
69
varName, &isNew);
70
- TclSetVarNamespaceVar(varPtr);
+ if (varPtr) {
71
+ TclSetVarNamespaceVar(varPtr);
72
+ }
73
return (Tcl_Var)varPtr;
74
75
0 commit comments