From: Jaakko Salli <jaakko.salli@dnainternet.net>
Date: Sun, 5 Oct 2008 09:43:51 +0000 (+0000)
Subject: GetEditableState() with DescBoxState flag could assert
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/72eb964f27314278f457477f47e1f601534af7cd

GetEditableState() with DescBoxState flag could assert

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/src/propgrid/propgridiface.cpp b/src/propgrid/propgridiface.cpp
index 603a9164f1..392efc06fc 100644
--- a/src/propgrid/propgridiface.cpp
+++ b/src/propgrid/propgridiface.cpp
@@ -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("|");