git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73012
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
wxSize tsize( wxChoice::DoGetSizeFromTextSize(xlen, ylen) );
{
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);
+ }