Check that wxFindReplaceDialog parent is non-null before using it
Although this dialog is normally supposed to have a valid parent, don't crash if it doesn't have one when any of its buttons are pressed.
This commit is contained in:
parent
0798906e7b
commit
8bbcf0af09
@ -90,7 +90,8 @@ void wxFindReplaceDialogBase::Send(wxFindDialogEvent& event)
|
||||
// because the dialog is a top level window, so do it manually as
|
||||
// in 9 cases out of 10 the message must be processed by the dialog
|
||||
// owner and not the dialog itself
|
||||
(void)GetParent()->ProcessWindowEvent(event);
|
||||
if ( GetParent() )
|
||||
(void)GetParent()->ProcessWindowEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user