avoid potential NULL pointer dereference, closes #15993

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2014-02-17 16:25:22 +00:00
parent 15c92b16a3
commit 95dfcdd678

View File

@@ -2497,13 +2497,11 @@ void wxAuiToolBar::OnLeftDown(wxMouseEvent& evt)
}
}
if (m_overflowSizerItem)
if (m_overflowSizerItem && m_overflowVisible && m_art)
{
wxRect overflow_rect = GetOverflowRect();
if (m_art &&
m_overflowVisible &&
overflow_rect.Contains(evt.m_x, evt.m_y))
if (overflow_rect.Contains(evt.m_x, evt.m_y))
{
wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_OVERFLOW_CLICK, -1);
e.SetEventObject(this);