]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/dialog.cpp
Make critical sections initialization really thread-safe.
[wxWidgets.git] / src / os2 / dialog.cpp
index 51152300491fbd8068633ef14aec5a59a8cb9bb8..2e5ff9f96f7999b6a274fce760ff74ce0372527b 100644 (file)
@@ -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;