From 8c0f0784084798f225cec198f530461e03014cd3 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 2 Feb 2010 11:23:31 +0000 Subject: [PATCH] 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 --- src/msw/choice.cpp | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.50.0