diff --git a/src/gtk/control.cpp b/src/gtk/control.cpp index 7aab1a03e5..f4a25ea146 100644 --- a/src/gtk/control.cpp +++ b/src/gtk/control.cpp @@ -60,7 +60,7 @@ bool wxControl::Create( wxWindow *parent, bool wxControl::SetFont(const wxFont& font) { const bool changed = base_type::SetFont(font); - if (changed && !gtk_widget_get_realized(m_widget) && gtk_check_version(3,5,0)) + if (changed && m_widget && !gtk_widget_get_realized(m_widget) && gtk_check_version(3,5,0)) { // GTK defers sending "style-updated" until widget is realized, but // GetBestSize() won't compute correct result until the signal is sent,