- if( info.xFontName.IsEmpty() )
- font.GetInternalFont();
- gtk_font_selection_dialog_set_font_name(sel, wxConvCurrent->cWX2MB(info.xFontName.GetData()));
+ if ( info )
+ {
+ const wxString& fontname = info->xFontName;
+ if ( !fontname )
+ font.GetInternalFont();
+ gtk_font_selection_dialog_set_font_name(sel,
+ wxConvCurrent->cWX2MB(fontname));
+ }
+ else
+ {
+ // this is not supposed to happen!
+ wxFAIL_MSG(_T("font is ok but no native font info?"));
+ }