mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-04 17:49:45 +02:00
Bug 2028 - Mac: Audacity crashes when right clicking in label after copying label text to another app
With the steps in bug 2028, FindFocus() could return a nullPtr - which is now safe. No right context menu will appear though. This looks like a bug in wxWidgets. We could take more/different steps to find the parent for the LabelTrack, if we really want to do that. However, this change is enough to close the bug.
This commit is contained in:
parent
5a87d5ea67
commit
5e1ec8dbe5
@ -2159,6 +2159,7 @@ void LabelTrack::ShowContextMenu()
|
||||
{
|
||||
wxWindow *parent = wxWindow::FindFocus();
|
||||
|
||||
if( parent )
|
||||
{
|
||||
wxMenu menu;
|
||||
menu.Bind(wxEVT_MENU, &LabelTrack::OnContextMenu, this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user