diff --git a/contrib/src/xrc/xh_statbar.cpp b/contrib/src/xrc/xh_statbar.cpp index a31db982a4..60e1a894fe 100644 --- a/contrib/src/xrc/xh_statbar.cpp +++ b/contrib/src/xrc/xh_statbar.cpp @@ -48,7 +48,7 @@ wxObject *wxStatusBarXmlHandler::DoCreateResource() int fields = GetLong(wxT("fields"), 1); wxString widths = GetParamValue(wxT("widths")); - if(fields > 1) + if (fields > 1 && !widths.IsEmpty()) { int *width = new int[fields]; diff --git a/src/xrc/xh_statbar.cpp b/src/xrc/xh_statbar.cpp index a31db982a4..60e1a894fe 100644 --- a/src/xrc/xh_statbar.cpp +++ b/src/xrc/xh_statbar.cpp @@ -48,7 +48,7 @@ wxObject *wxStatusBarXmlHandler::DoCreateResource() int fields = GetLong(wxT("fields"), 1); wxString widths = GetParamValue(wxT("widths")); - if(fields > 1) + if (fields > 1 && !widths.IsEmpty()) { int *width = new int[fields];