From ab14eecb175301573fce8a342cd7722c77a7a98f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 18 Feb 2023 16:03:17 +0000 Subject: [PATCH] Remove useless assert from the sizer code Asserting that a pointer is non-null before dereferencing it is useless as if it were null, we'd crash anyhow. In this particular case, the pointer is guaranteed to never be null because we only call Item() if the index passed to it is valid, so the assert can never be triggered. --- src/common/sizer.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 9e7781ffbb..25b68f0efb 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -1605,8 +1605,6 @@ void wxGridSizer::RepositionChildren(const wxSize& WXUNUSED(minSize)) { wxSizerItemList::compatibility_iterator node = m_children.Item( i ); - wxASSERT_MSG( node, wxT("Failed to find SizerItemList node") ); - SetItemBounds( node->GetData(), x, y, w, h); } y = y + h + m_vgap;