From 095c95852551444cd04411714fc0a1793640696b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= Date: Thu, 3 Nov 2016 16:27:28 +0100 Subject: [PATCH] Fix ~wxDataViewCtrl assert when running under JAWS Accessible object must be destroyed as soon as possible, because otherwise a screen reader may try to query it before wxWindow destructor removed it, but after ~wxDataViewCtrl destructor finished. The wxACC_EVENT_OBJECT_DESTROY notification causes exactly that under JAWS. --- src/generic/datavgen.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 9432668a5c..02b2572d7b 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -4731,6 +4731,7 @@ wxDataViewCtrl::~wxDataViewCtrl() m_colsBestWidths.clear(); #if wxUSE_ACCESSIBILITY + SetAccessible(NULL); wxAccessible::NotifyEvent(wxACC_EVENT_OBJECT_DESTROY, this, wxOBJID_CLIENT, wxACC_SELF); #endif // wxUSE_ACCESSIBILITY }