]> git.saurik.com Git - wxWidgets.git/commitdiff
GetEditableState() with DescBoxState flag could assert
authorJaakko Salli <jaakko.salli@dnainternet.net>
Sun, 5 Oct 2008 09:43:51 +0000 (09:43 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Sun, 5 Oct 2008 09:43:51 +0000 (09:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/propgrid/propgridiface.cpp

index 603a9164f1db917f32c33ca229053ce131ea2cc9..392efc06fca633d8b5f28a05eb2f2541233fa9b0 100644 (file)
@@ -1015,7 +1015,8 @@ wxString wxPropertyGridInterface::SaveEditableState( int includedStates ) const
         if ( includedStates & DescBoxState )
         {
             wxVariant v = GetEditableStateItem(wxS("descboxheight"));
-            result += wxString::Format(wxS("descboxheight=%i;"), (int)v.GetLong());
+            if ( !v.IsNull() )
+                result += wxString::Format(wxS("descboxheight=%i;"), (int)v.GetLong());
         }
         result.RemoveLast();  // Remove last semicolon
         result += wxS("|");