don't crash if an item has a NULL ID

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi 2009-01-14 16:10:02 +00:00
parent 07a971eeff
commit d6a3ec35c8

View File

@ -331,7 +331,7 @@ public:
MyMusicModelNode *node = (MyMusicModelNode*) item.GetID();
// "MyMusic" also has no parent
if (node == m_root)
if (node == m_root || node == NULL)
return wxDataViewItem(0);
return wxDataViewItem( (void*) node->GetParent() );