diff --git a/src/os2/dialog.cpp b/src/os2/dialog.cpp index 5115230049..2e5ff9f96f 100644 --- a/src/os2/dialog.cpp +++ b/src/os2/dialog.cpp @@ -236,11 +236,7 @@ int wxDialog::ShowModal() if ( !m_endModalCalled ) { // modal dialog needs a parent window, so try to find one - wxWindow *parent = GetParent(); - if ( !parent ) - { - parent = FindSuitableParent(); - } + wxWindow * const parent = GetParentForModalDialog(); // remember where the focus was wxWindow *oldFocus = m_pOldFocus;