From 349ac76e9a95dde9d4bc8d8ed7f6155c299c0474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 14 Oct 2002 22:40:40 +0000 Subject: [PATCH] given an assert when trying to do something stupid git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/xrc/xmlres.cpp | 2 ++ src/xrc/xmlres.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/contrib/src/xrc/xmlres.cpp b/contrib/src/xrc/xmlres.cpp index 98cb77e1f5..f862795a2d 100644 --- a/contrib/src/xrc/xmlres.cpp +++ b/contrib/src/xrc/xmlres.cpp @@ -895,6 +895,8 @@ wxIcon wxXmlResourceHandler::GetIcon(const wxString& param, wxXmlNode *wxXmlResourceHandler::GetParamNode(const wxString& param) { + wxCHECK_MSG(m_node, NULL, wxT("You can't access handler data before it was initialized!")); + wxXmlNode *n = m_node->GetChildren(); while (n) diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index 98cb77e1f5..f862795a2d 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -895,6 +895,8 @@ wxIcon wxXmlResourceHandler::GetIcon(const wxString& param, wxXmlNode *wxXmlResourceHandler::GetParamNode(const wxString& param) { + wxCHECK_MSG(m_node, NULL, wxT("You can't access handler data before it was initialized!")); + wxXmlNode *n = m_node->GetChildren(); while (n)