From 3a5db1e7d29fbc0367d97e23a89e325cb156bc64 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 5 Jun 2009 22:38:48 +0000 Subject: [PATCH] backport: avoiding events during destruction, fixes #10855 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_9_0_BRANCH@60904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/listbox_osx.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/osx/listbox_osx.cpp b/src/osx/listbox_osx.cpp index 73ddffafbe..fc3251897f 100644 --- a/src/osx/listbox_osx.cpp +++ b/src/osx/listbox_osx.cpp @@ -103,7 +103,10 @@ bool wxListBox::Create( wxListBox::~wxListBox() { + m_blockEvents = true; FreeData(); + m_blockEvents = false; + // make sure no native events get sent to a object in destruction delete m_peer; m_peer = NULL;