Fixed various NULL reference issues. Also cleaned up wxPGComboBox code overall a bit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2008-11-15 10:34:36 +00:00
parent 77db639d44
commit e9cc4973ff
4 changed files with 32 additions and 18 deletions

View File

@@ -363,7 +363,10 @@ public:
*/
const wxPGAttributeStorage& GetPropertyAttributes( wxPGPropArg id ) const
{
wxPG_PROP_ARG_CALL_PROLOG_RETVAL(*((const wxPGAttributeStorage*)NULL));
// If 'id' refers to invalid property, then we will return dummy
// attributes (ie. root property's attributes, which contents should
// should always be empty and of no consequence).
wxPG_PROP_ARG_CALL_PROLOG_RETVAL(m_pState->DoGetRoot()->GetAttributes());
return p->GetAttributes();
}