diff options
author | oehhar <harald.oehlmann@elmicron.de> | 2024-07-22 12:28:17 (GMT) |
---|---|---|
committer | oehhar <harald.oehlmann@elmicron.de> | 2024-07-22 12:28:17 (GMT) |
commit | ca8d4ac42662adcd82974b265f773234bed034e0 (patch) | |
tree | 6971ad6cb636053734716bf20184e8234926d415 /generic | |
parent | e8e73186ca2338f5c497ee8a0dd621977d2f215b (diff) | |
parent | 14b416c8a098f473d29296e5af955a1584c41e75 (diff) | |
download | tk-ca8d4ac42662adcd82974b265f773234bed034e0.zip tk-ca8d4ac42662adcd82974b265f773234bed034e0.tar.gz tk-ca8d4ac42662adcd82974b265f773234bed034e0.tar.bz2 |
Ticket [2d3a81c0] MS-Win: segfault on menubutton destroy: merge fix branch
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkMenu.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/generic/tkMenu.c b/generic/tkMenu.c index be60f2a..083db40 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -1008,7 +1008,7 @@ MenuWidgetObjCmd( * * Side effects: * Commands may get excecuted; variables may get set; sub-menus may get - * posted. + * posted, the passed menu may be destroyed. * *---------------------------------------------------------------------- */ @@ -1017,8 +1017,12 @@ int TkInvokeMenu( Tcl_Interp *interp, /* The interp that the menu lives in. */ TkMenu *menuPtr, /* The menu we are invoking. */ - Tcl_Size index) /* The zero based index of the item we are - * invoking. */ + /* Must be protected by Tcl_Preserve + * against freeing by the caller. + * Tk Bug [2d3a81c0]. + */ + Tcl_Size index) /* The zero based index of the item we are + * invoking. */ { int result = TCL_OK; TkMenuEntry *mePtr; |