Amend overly aggressive assert.

This commit is contained in:
Jeff Young 2023-04-17 17:52:28 +01:00
parent 2533141583
commit f72cc6dd51
1 changed files with 3 additions and 1 deletions

View File

@ -321,7 +321,9 @@ void VIEW::Add( VIEW_ITEM* aItem, int aDrawPriority )
if( !aItem->m_viewPrivData ) if( !aItem->m_viewPrivData )
aItem->m_viewPrivData = new VIEW_ITEM_DATA; aItem->m_viewPrivData = new VIEW_ITEM_DATA;
wxASSERT_MSG( aItem->m_viewPrivData->m_view == nullptr, wxS( "Already in a different view!" ) ); wxASSERT_MSG( aItem->m_viewPrivData->m_view == nullptr
|| aItem->m_viewPrivData->m_view == this,
wxS( "Already in a different view!" ) );
aItem->m_viewPrivData->m_view = this; aItem->m_viewPrivData->m_view = this;
aItem->m_viewPrivData->m_drawPriority = aDrawPriority; aItem->m_viewPrivData->m_drawPriority = aDrawPriority;