summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkState.c
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2025-05-23 02:28:37 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2025-05-23 02:28:37 (GMT)
commit25f16a070dd42bc33af26334d2071a81377aee5c (patch)
treef20dcb1268a10aa292953f0ffa965881fefed78b /generic/ttk/ttkState.c
parente1675428ff056ed7a44fcc26a26dc5adb8e5f9eb (diff)
parentf8e4b115fdb0f0886cd853323937b8ea757fcc21 (diff)
downloadtk-core-tip-716.zip
tk-core-tip-716.tar.gz
tk-core-tip-716.tar.bz2
Merge core-9-0-branchcore-tip-716
Diffstat (limited to 'generic/ttk/ttkState.c')
-rw-r--r--generic/ttk/ttkState.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/generic/ttk/ttkState.c b/generic/ttk/ttkState.c
index d06795c..48ca322 100644
--- a/generic/ttk/ttkState.c
+++ b/generic/ttk/ttkState.c
@@ -110,10 +110,13 @@ static int StateSpecSetFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr)
}
}
- /* Invalidate old intrep:
+ /* Invalidate old intrep, but make sure there's a string rep, see [7231bf9941].
*/
- if (objPtr->typePtr && objPtr->typePtr->freeIntRepProc) {
- objPtr->typePtr->freeIntRepProc(objPtr);
+ if (objPtr->typePtr) {
+ (void)Tcl_GetString(objPtr);
+ if (objPtr->typePtr->freeIntRepProc) {
+ objPtr->typePtr->freeIntRepProc(objPtr);
+ }
}
objPtr->typePtr = &StateSpecObjType.objType;