From f18f82b3a73261b2d71dc4ee5c7c19ec87546fc1 Mon Sep 17 00:00:00 2001 From: oehhar Date: Thu, 18 Jul 2024 08:11:17 +0000 Subject: Comments changed --- generic/tkMenu.c | 5 +++-- win/tkWinMenu.c | 4 ---- 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) { -- cgit v0.12