]> git.saurik.com Git - wxWidgets.git/commitdiff
don't crash
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 12 Dec 2003 22:03:43 +0000 (22:03 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 12 Dec 2003 22:03:43 +0000 (22:03 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24794 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/xrc/xh_sizer.cpp
src/xrc/xh_sizer.cpp

index db47dceec3cc9b8741db06af955cfc2f6092ee54..3473ccd023887f21c19fc14c100dd99c0ce6b0e6 100644 (file)
@@ -175,7 +175,7 @@ wxObject* wxSizerXmlHandler::Handle_sizer()
     wxXmlNode *parentNode = m_node->GetParent();
 
     wxCHECK_MSG(m_parentSizer != NULL ||
-                (parentNode->GetType() == wxXML_ELEMENT_NODE &&
+                (parentNode && parentNode->GetType() == wxXML_ELEMENT_NODE &&
                  m_parentAsWindow != NULL &&
                  (m_parentAsWindow->IsKindOf(CLASSINFO(wxPanel)) ||
                   m_parentAsWindow->IsKindOf(CLASSINFO(wxFrame)) ||
index db47dceec3cc9b8741db06af955cfc2f6092ee54..3473ccd023887f21c19fc14c100dd99c0ce6b0e6 100644 (file)
@@ -175,7 +175,7 @@ wxObject* wxSizerXmlHandler::Handle_sizer()
     wxXmlNode *parentNode = m_node->GetParent();
 
     wxCHECK_MSG(m_parentSizer != NULL ||
-                (parentNode->GetType() == wxXML_ELEMENT_NODE &&
+                (parentNode && parentNode->GetType() == wxXML_ELEMENT_NODE &&
                  m_parentAsWindow != NULL &&
                  (m_parentAsWindow->IsKindOf(CLASSINFO(wxPanel)) ||
                   m_parentAsWindow->IsKindOf(CLASSINFO(wxFrame)) ||