From 469349b5c898c8f7fe5a4807c17f8a1695ba50c9 Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Sun, 17 Aug 2003 19:53:51 +0000 Subject: [PATCH] Check for NULL base class. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/object.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/wx/object.h b/include/wx/object.h index 2f5ffd3b5e..b065d9d92b 100644 --- a/include/wx/object.h +++ b/include/wx/object.h @@ -83,8 +83,10 @@ public: wxObject *CreateObject() { return m_objectConstructor ? (*m_objectConstructor)() : 0; } const wxChar *GetClassName() const { return m_className; } - const wxChar *GetBaseClassName1() const { return m_baseInfo1->GetClassName(); } - const wxChar *GetBaseClassName2() const { return m_baseInfo2->GetClassName(); } + const wxChar *GetBaseClassName1() const + { return m_baseInfo1 ? m_baseInfo1->GetClassName() : NULL; } + const wxChar *GetBaseClassName2() const + { return m_baseInfo2 ? m_baseInfo2->GetClassName() : NULL; } const wxClassInfo *GetBaseClass1() const { return m_baseInfo1; } const wxClassInfo *GetBaseClass2() const { return m_baseInfo2; } int GetSize() const { return m_objectSize; }