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