From 187cbf1efaf9ad67a578e831c6fb90811ede1c59 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 5 Jul 2020 23:15:05 +0200 Subject: [PATCH] Use CHECK, not ASSERT, in wxSizer::Replace() if item is NULL This is a violation of function preconditions, so don't bother doing anything in this case. --- src/common/sizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 33c8d39ce1..ed956e4aea 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -869,7 +869,7 @@ bool wxSizer::Replace( wxSizer *oldsz, wxSizer *newsz, bool recursive ) bool wxSizer::Replace( size_t old, wxSizerItem *newitem ) { wxCHECK_MSG( old < m_children.GetCount(), false, wxT("Replace index is out of range") ); - wxASSERT_MSG( newitem, wxT("Replacing with NULL item") ); + wxCHECK_MSG( newitem, false, wxT("Replacing with NULL item") ); wxSizerItemList::compatibility_iterator node = m_children.Item( old );