]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/fontpicker.cpp
don't crash in dtor if the X11 window hadn't been created (patch 1640153)
[wxWidgets.git] / src / gtk / fontpicker.cpp
index eda8022cc19a7c96f09b5f4854e5812a95a0c7af..bc24c2e8d8f337098d48dff73b683aa4e408009e 100644 (file)
@@ -73,7 +73,7 @@ bool wxFontButton::Create( wxWindow *parent, wxWindowID id,
         m_widget = gtk_font_button_new();
 
         // set initial font
-        m_selectedFont = initial;
+        m_selectedFont = initial.IsOk() ? initial : *wxNORMAL_FONT;
         UpdateFont();
 
         // honour the fontbutton styles