]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/dialog.cpp
Use real id for wxPGCanvas
[wxWidgets.git] / src / osx / carbon / dialog.cpp
index 8855697d645486c0ff0b6dd279cbda663da05907..16a77b7ce23919e540b0f9a8a0d34ba07fd86b35 100644 (file)
@@ -47,17 +47,10 @@ void wxDialog::DoShowModal()
     }
     BeginAppModalStateForWindow(windowRef) ;
 
-    wxEventLoop * const
-        loop = static_cast<wxEventLoop *>(wxEventLoop::GetActive());
-
-
-    wxASSERT_MSG( loop , wxT("No Event Loop in place") );
-
-    if ( loop )
-    {
-        while ( IsModal() )
-            loop->Dispatch();
-    }
+    wxEventLoopGuarantor ensureHasLoop;
+    wxEventLoopBase * const loop = wxEventLoop::GetActive();
+    while ( IsModal() )
+        loop->Dispatch();
 
     EndAppModalStateForWindow(windowRef) ;
     if ( resetGroupParent )