X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/35524f615e56a566786b7621c4b1d16a9c7dd3c7..8d6e8e45fe72afcb38d1da3b2b90c307ac052b0c:/src/common/statbar.cpp diff --git a/src/common/statbar.cpp b/src/common/statbar.cpp index 9ceccf1277..323ce920e0 100644 --- a/src/common/statbar.cpp +++ b/src/common/statbar.cpp @@ -194,12 +194,15 @@ void wxStatusBarBase::PushStatusText(const wxString& text, int number) // save current status text in the stack m_panes[number].arrStack.push_back(GetStatusText(number)); - // update current status text SetStatusText(text, number); + // update current status text (eventually also in the native control) } void wxStatusBarBase::PopStatusText(int number) { + wxASSERT_MSG(m_panes[number].arrStack.GetCount() == 1, + "can't pop any further string"); + wxString text = m_panes[number].arrStack.back(); m_panes[number].arrStack.pop_back(); // also remove it from the stack