diff options
author | dgp <dgp@noemail.net> | 2013-03-11 18:39:23 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2013-03-11 18:39:23 (GMT) |
commit | 78a1f6045e20c75c25d8ac54b16993492f217d9e (patch) | |
tree | 8d99c3d688bd25abab53e0bf56261399255a5e32 | |
parent | e9cfcf8246b9fc5f421c106f9d25d0bd6ccc55bc (diff) | |
parent | e8f42ef4f2c2d542c1a2a2ec471b2f697f489a08 (diff) | |
download | tk-78a1f6045e20c75c25d8ac54b16993492f217d9e.zip tk-78a1f6045e20c75c25d8ac54b16993492f217d9e.tar.gz tk-78a1f6045e20c75c25d8ac54b16993492f217d9e.tar.bz2 |
3607326 Stop segfault from [listbox .l -listvariable $array].
FossilOrigin-Name: e8c5b9ddf885baaf2949b8e5db2b056d2ccdc645
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tkListbox.c | 3 | ||||
-rw-r--r-- | tests/listbox.test | 11 |
3 files changed, 16 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2013-03-11 Don Porter <dgp@users.sourceforge.net> + + * generic/tkListbox.c: [Bug 3607326] Stop segfault from + * tests/listbox.test: [listbox .l -listvariable $array]. + 2013-02-28 Donal K. Fellows <dkf@users.sf.net> * unix/tkUnixKey.c (TkpGetKeySym): [Bug 3599312]: Put the diff --git a/generic/tkListbox.c b/generic/tkListbox.c index 48287ee..d77fc8f 100644 --- a/generic/tkListbox.c +++ b/generic/tkListbox.c @@ -1629,9 +1629,6 @@ ConfigureListbox( if (Tcl_SetVar2Ex(interp, listPtr->listVarName, NULL, listVarObj, TCL_GLOBAL_ONLY|TCL_LEAVE_ERR_MSG) == NULL) { - if (oldListObj == NULL) { - Tcl_DecrRefCount(listVarObj); - } continue; } } diff --git a/tests/listbox.test b/tests/listbox.test index 0805528..e05d574 100644 --- a/tests/listbox.test +++ b/tests/listbox.test @@ -3057,6 +3057,17 @@ test listbox-29.1 {listbox selection behavior, -state disabled} -setup { destroy .l } -result {1 1 2} +test listbox-30.1 {Bug 3607326} -setup { + destroy .l + unset -nocomplain a +} -body { + array set a {} + listbox .l -listvariable a +} -cleanup { + destroy .l + unset -nocomplain a +} -result * -match glob -returnCodes error + resetGridInfo deleteWindows option clear |