]> git.saurik.com Git - wxWidgets.git/commitdiff
Check for empty "widths"
authorJulian Smart <julian@anthemion.co.uk>
Mon, 17 May 2004 17:02:59 +0000 (17:02 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 17 May 2004 17:02:59 +0000 (17:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/xrc/xh_statbar.cpp
src/xrc/xh_statbar.cpp

index a31db982a4229414e86798eddce32db3f4c05031..60e1a894fef76591fbb44633c56d6f802b00212f 100644 (file)
@@ -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];
 
index a31db982a4229414e86798eddce32db3f4c05031..60e1a894fef76591fbb44633c56d6f802b00212f 100644 (file)
@@ -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];