Work around a crash in wxGTK3 GUI test suite

The tests crashed after running ModalDialogsTestCase::FileDialog() because the
next call to wxYield() resulted in the completion of an async operation
launched by the native file dialog which tried to dereference the already
destroyed dialog.
This commit is contained in:
Vadim Zeitlin 2016-02-27 02:22:25 +01:00
parent de491dd67f
commit 9fee931d6d

View File

@ -79,6 +79,13 @@ void ModalDialogsTestCase::FileDialog()
CPPUNIT_ASSERT_EQUAL((int)wxID_OK, rc);
CPPUNIT_ASSERT_EQUAL("test.txt", dlg.GetFilename());
#ifdef __WXGTK3__
// The native file dialog in GTK+ 3 launches an async operation which tries
// to dereference the already deleted dialog object if we don't let it to
// complete before leaving this function.
wxYield();
#endif
}