]> git.saurik.com Git - wxWidgets.git/commitdiff
Ensure that wxPropertyGrid::m_tlp is initialized early enough.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 15 Dec 2011 00:22:48 +0000 (00:22 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 15 Dec 2011 00:22:48 +0000 (00:22 +0000)
This member variable could be used before it was initialized as
OnTLPChanging() was called from Create() before Init2(), where m_tlp was
assigned NULL, was called.

Closes #13552.

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

src/propgrid/propgrid.cpp

index 77a3209a50f3c5edd80c3c462fdc722c1fa6e839..4904e109364313d2df134f7242f468eeb5ddaddf 100644 (file)
@@ -348,6 +348,7 @@ void wxPropertyGrid::Init1()
     m_eventObject = this;
     m_curFocused = NULL;
     m_processedEvent = NULL;
+    m_tlp = NULL;
     m_sortFunction = NULL;
     m_inDoPropertyChanged = false;
     m_inCommitChangesFromEditor = false;
@@ -465,7 +466,6 @@ void wxPropertyGrid::Init2()
     SetBackgroundStyle( wxBG_STYLE_CUSTOM );
 
     // Hook the top-level parent
-    m_tlp = NULL;
     m_tlpClosed = NULL;
     m_tlpClosedTime = 0;