diff options
| author | apnadkarni <apnmbx-wits@yahoo.com> | 2025-05-23 02:28:37 (GMT) |
|---|---|---|
| committer | apnadkarni <apnmbx-wits@yahoo.com> | 2025-05-23 02:28:37 (GMT) |
| commit | 25f16a070dd42bc33af26334d2071a81377aee5c (patch) | |
| tree | f20dcb1268a10aa292953f0ffa965881fefed78b /generic/ttk/ttkState.c | |
| parent | e1675428ff056ed7a44fcc26a26dc5adb8e5f9eb (diff) | |
| parent | f8e4b115fdb0f0886cd853323937b8ea757fcc21 (diff) | |
| download | tk-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.c | 9 |
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; |
