mirror of
https://github.com/audacity/wxWidgets.git
synced 2025-12-10 03:58:56 -06:00
First check whether it is attempted to delete the root property
Because wxPGRootProperty has no parent, just like an unattached (waiting for deletion) child wxPGProperty, so we have to first check whether the property is the root and next whether it has a parent.
This commit is contained in:
parent
a60c5b36fe
commit
ec42121235
@ -1839,12 +1839,12 @@ bool wxPropertyGridPageState::IsChildCategory(wxPGProperty* p,
|
||||
|
||||
void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete )
|
||||
{
|
||||
wxCHECK_RET(item != &m_regularArray && item != m_abcArray,
|
||||
wxS("wxPropertyGrid: Do not attempt to remove the root item."));
|
||||
|
||||
wxCHECK_RET( item->GetParent(),
|
||||
wxS("wxPropertyGrid: This property was already deleted.") );
|
||||
|
||||
wxCHECK_RET( item != &m_regularArray && item != m_abcArray,
|
||||
wxS("wxPropertyGrid: Do not attempt to remove the root item.") );
|
||||
|
||||
wxPGProperty* parent = item->GetParent();
|
||||
|
||||
wxCHECK_RET( !parent->HasFlag(wxPG_PROP_AGGREGATE),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user