]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't crash if there's no top window.
authorJulian Smart <julian@anthemion.co.uk>
Tue, 2 Feb 2010 11:23:31 +0000 (11:23 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 2 Feb 2010 11:23:31 +0000 (11:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/choice.cpp

index 85eb015339bebc37e66624eaae8b95b288a6660c..fd54852b9da951bc91c4ccfa1cdd0d20f3059c09 100644 (file)
@@ -235,6 +235,8 @@ wxChoice::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
 
     // FIXME: Use better dummy window?
     wxWindow* wnd = wxTheApp->GetTopWindow();
+    if (!wnd)
+        return attrs;
 
     attrs.font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);