From 955774a91aa20a946154e1c106fee2e6a96952ab Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 17 Apr 2023 17:52:28 +0100 Subject: [PATCH] Amend overly aggressive assert. --- common/view/view.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 5f8a127480..4e9220d1fa 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -321,7 +321,9 @@ void VIEW::Add( VIEW_ITEM* aItem, int aDrawPriority ) if( !aItem->m_viewPrivData ) 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_drawPriority = aDrawPriority;