X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8bda0ec6a3b0a7852eb0056f20a0dba7b07ea593..c65c67bebaac058737b3eda114e7c3dc1f022423:/src/os2/dialog.cpp

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;