X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4d073429a06c885db6440b79d754d8316d847223..0263da03711c430dfd7a2452dc9b0239f7081376:/src/xrc/xh_statbar.cpp diff --git a/src/xrc/xh_statbar.cpp b/src/xrc/xh_statbar.cpp index a31db982a4..a5e04452ef 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]; @@ -61,6 +61,8 @@ wxObject *wxStatusBarXmlHandler::DoCreateResource() statbar->SetFieldsCount(fields, width); delete[] width; } + else + statbar->SetFieldsCount(fields); if (m_parentAsWindow) {