diff --git a/docs/changes.txt b/docs/changes.txt index 77931bceee..5dd86e51dc 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -588,6 +588,7 @@ All (GUI): - Fix wxCommandProcessor::IsDirty() return value which was wrong after undoing all commands without saving (Neil Chittenden). - Fix crash when Destroy()-ing a TLW with non-TLW parent. +- Fix crash in wxAuiToolBar::GetToolBarFits(). wxGTK: diff --git a/src/aui/auibar.cpp b/src/aui/auibar.cpp index f2af2eb1f1..4170d8d960 100644 --- a/src/aui/auibar.cpp +++ b/src/aui/auibar.cpp @@ -1772,7 +1772,7 @@ bool wxAuiToolBar::GetToolFitsByIndex(int tool_idx) const if (m_orientation == wxVERTICAL) { // take the dropdown size into account - if (m_overflowVisible) + if (m_overflowVisible && m_overflowSizerItem) cli_h -= m_overflowSizerItem->GetSize().y; if (rect.y+rect.height < cli_h) @@ -1781,7 +1781,7 @@ bool wxAuiToolBar::GetToolFitsByIndex(int tool_idx) const else { // take the dropdown size into account - if (m_overflowVisible) + if (m_overflowVisible && m_overflowSizerItem) cli_w -= m_overflowSizerItem->GetSize().x; if (rect.x+rect.width < cli_w)