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