From: Julian Smart Date: Tue, 2 Feb 2010 11:23:31 +0000 (+0000) Subject: Don't crash if there's no top window. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8c0f0784084798f225cec198f530461e03014cd3 Don't crash if there's no top window. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp index 85eb015339..fd54852b9d 100644 --- a/src/msw/choice.cpp +++ b/src/msw/choice.cpp @@ -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);