Don't keep dangling pointers in other wxRibbonButtonBar members neither.
This should have been part of r75710: after deleting the button, also reset any stored pointers to it. Closes #15909. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -515,6 +515,10 @@ bool wxRibbonButtonBar::DeleteButton(int button_id)
|
||||
{
|
||||
m_layouts_valid = false;
|
||||
m_buttons.RemoveAt(i);
|
||||
if (m_hovered_button && m_hovered_button->base == button)
|
||||
m_hovered_button = NULL;
|
||||
if (m_active_button && m_active_button->base == button)
|
||||
m_active_button = NULL;
|
||||
delete button;
|
||||
Realize();
|
||||
Refresh();
|
||||
|
Reference in New Issue
Block a user