fix one of reasons for crash if there is no font
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e00a5d3ca1
commit
2269ff5679
@ -330,9 +330,9 @@ wxFont wxSystemSettingsNative::GetFont( wxSystemFont index )
|
||||
#ifdef __WXGTK20__
|
||||
GtkWidget *widget = gtk_button_new();
|
||||
GtkStyle *def = gtk_rc_get_style( widget );
|
||||
if (!def)
|
||||
if ( !def || !def->font_desc )
|
||||
def = gtk_widget_get_default_style();
|
||||
if (def)
|
||||
if ( def && def->font_desc )
|
||||
{
|
||||
wxNativeFontInfo info;
|
||||
info.description = def->font_desc;
|
||||
|
@ -330,9 +330,9 @@ wxFont wxSystemSettingsNative::GetFont( wxSystemFont index )
|
||||
#ifdef __WXGTK20__
|
||||
GtkWidget *widget = gtk_button_new();
|
||||
GtkStyle *def = gtk_rc_get_style( widget );
|
||||
if (!def)
|
||||
if ( !def || !def->font_desc )
|
||||
def = gtk_widget_get_default_style();
|
||||
if (def)
|
||||
if ( def && def->font_desc )
|
||||
{
|
||||
wxNativeFontInfo info;
|
||||
info.description = def->font_desc;
|
||||
|
Loading…
Reference in New Issue
Block a user