wxComboBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
{
#ifdef __WXGTK3__
- return GetDefaultAttributesFromGTKWidget(gtk_combo_box_new_with_entry, true);
+ return GetDefaultAttributesFromGTKWidget(gtk_combo_box_new_with_entry(), true);
#else
- return GetDefaultAttributesFromGTKWidget(gtk_combo_box_entry_new, true);
+ return GetDefaultAttributesFromGTKWidget(gtk_combo_box_entry_new(), true);
#endif
}
{
wxSize tsize( wxChoice::DoGetSizeFromTextSize(xlen, ylen) );
- // Add the margins we have previously set, but only the horizontal border
- // as vertical one has been taken account in the prevoius call.
- // Also get other GTK+ margins.
- tsize.IncBy( GTKGetEntryMargins(GetEntry()).x, 0);
+ GtkEntry* entry = GetEntry();
+ if (entry)
+ {
+ // Add the margins we have previously set, but only the horizontal border
+ // as vertical one has been taken account in the previous call.
+ // Also get other GTK+ margins.
+ tsize.IncBy(GTKGetEntryMargins(entry).x, 0);
+ }
return tsize;
}