From: Julian Smart Date: Mon, 17 May 2004 17:02:59 +0000 (+0000) Subject: Check for empty "widths" X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/fd9e9adb1652f7b602a903dc1cc7d2571a3def55 Check for empty "widths" git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- 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];