It doesn't make sense to check whether a pointer is NULL after using it, so do
the checks first.
In fact the m_art pointer probably can never be NULL at all as other code uses
it without checking and so these checks could probably be removed completely,
but keep them for now as I'm not totally sure if having NULL art provider is
really impossible.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70748
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
return;
}
- if (m_overflowSizerItem)
+ if (m_overflowSizerItem && m_art)
{
int dropdown_size = m_art->GetElementSize(wxAUI_TBART_OVERFLOW_SIZE);
if (dropdown_size > 0 &&
evt.m_x > cli_rect.width - dropdown_size &&
evt.m_y >= 0 &&
- evt.m_y < cli_rect.height &&
- m_art)
+ evt.m_y < cli_rect.height)
{
return;
}
return;
}
- if (m_overflowSizerItem)
+ if (m_overflowSizerItem && m_art)
{
int dropdown_size = m_art->GetElementSize(wxAUI_TBART_OVERFLOW_SIZE);
if (dropdown_size > 0 &&
evt.m_x > cli_rect.width - dropdown_size &&
evt.m_y >= 0 &&
- evt.m_y < cli_rect.height &&
- m_art)
+ evt.m_y < cli_rect.height)
{
return;
}