X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c79853685d09ba1d7eaef604395c40b731ed2f34..c2754d29034199bc158fc079f91c7bca15d40037:/src/gtk1/font.cpp diff --git a/src/gtk1/font.cpp b/src/gtk1/font.cpp index a486103090..5e9d1ce629 100644 --- a/src/gtk1/font.cpp +++ b/src/gtk1/font.cpp @@ -398,7 +398,16 @@ static GdkFont *GtkGetDefaultGuiFont() { GtkWidget *widget = gtk_button_new(); GtkStyle *def = gtk_rc_get_style( widget ); - g_systemDefaultGuiFont = gdk_font_ref( def->font ); + if (def) + { + g_systemDefaultGuiFont = gdk_font_ref( def->font ); + } + else + { + def = gtk_widget_get_default_style(); + if (def) + g_systemDefaultGuiFont = gdk_font_ref( def->font ); + } gtk_widget_destroy( widget ); } return g_systemDefaultGuiFont; @@ -428,7 +437,7 @@ GdkFont *wxFont::GetInternalFont( float scale ) const { font = GtkGetDefaultGuiFont(); } - else + if (!font) { font = wxLoadQueryNearestFont( point_scale, M_FONTDATA->m_family,