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:
parent
07a971eeff
commit
d6a3ec35c8
@ -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() );
|
||||
|
Loading…
Reference in New Issue
Block a user