]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/except/except.cpp
Compile fix for sound without threads. Not sure
[wxWidgets.git] / samples / except / except.cpp
index 6f8a0acbbef036cdade049021150e1218141d553..a7f2d7ad94c15bca0b739cfa5d66696d59bf0e39 100644 (file)
@@ -270,9 +270,17 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
 
 void MyFrame::OnDialog(wxCommandEvent& WXUNUSED(event))
 {
-    MyDialog dlg(this);
+    try
+    {
+        MyDialog dlg(this);
 
-    dlg.ShowModal();
+        dlg.ShowModal();
+    }
+    catch ( ... )
+    {
+        Destroy();
+        throw;
+    }
 }
 
 void MyFrame::OnThrowString(wxCommandEvent& WXUNUSED(event))