summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tkMenu.c5
-rw-r--r--win/tkWinMenu.c4
2 files changed, 3 insertions, 6 deletions
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index 9ba5a15..fcf49a6 100644
--- a/generic/tkMenu.c
+++ b/generic/tkMenu.c
@@ -991,8 +991,9 @@ int
TkInvokeMenu(
Tcl_Interp *interp, /* The interp that the menu lives in. */
TkMenu *menuPtr, /* The menu we are invoking. */
- /* Must be protected by Tcl_preserve
- * against freeing by the caller
+ /* Must be protected by Tcl_Preserve
+ * against freeing by the caller.
+ * Tk Bug [2d3a81c0].
*/
int index) /* The zero based index of the item we are
* invoking. */
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index 9d9e19c..cd7c4aa 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.c
@@ -1240,10 +1240,6 @@ TkWinHandleMenuEvent(
interp = menuPtr->interp;
Tcl_Preserve(interp);
- /*
- * Tk Bug 2d3a81c0: menu may be freed in callback, but menu item is
- * preserved. As menu is required to delete menu item later, it segfaults.
- */
Tcl_Preserve(menuPtr);
code = TkInvokeMenu(interp, menuPtr, mePtr->index);
if (code != TCL_OK && code != TCL_CONTINUE && code != TCL_BREAK) {