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.
This commit is contained in:
Vadim Zeitlin 2023-02-18 16:03:17 +00:00
parent c8adb54029
commit ab14eecb17

View file

@ -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;