diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-11-13 22:07:51 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-11-16 13:11:47 +0100 |
commit | 6b6eb1abed5b278803c61d678aa16046add8d6fb (patch) | |
tree | 3e6aad636f7dcf90a0a75f65a7f98023ef85809f | |
parent | 21a9bc8716a88fa2472c525b2e6f84fe1213a8f8 (diff) |
sc: add some assertions on ScAccessibleEditLineTextData
JunitTest_sc_unoapi crashed when accessing a disposed ScTextWnd from
~ScAccessibleEditLineTextData(), but the ScTextWnd::dispose() would also
call ScAccessibleEditLineTextData::Dispose() and clear mpWindow, so it
seems impossible to observe a disposed ScTextWnd in the dtor?
Change-Id: If571ee61d9a29601acb1de552ec1b9cc36d0d51e
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleText.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx index d18735d3a815..13f23a3f6da6 100644 --- a/sc/source/ui/Accessibility/AccessibleText.cxx +++ b/sc/source/ui/Accessibility/AccessibleText.cxx @@ -1066,7 +1066,10 @@ ScAccessibleEditLineTextData::~ScAccessibleEditLineTextData() ScTextWnd* pTxtWnd = dynamic_cast< ScTextWnd* >(mpWindow.get()); if (pTxtWnd) + { + assert(!pTxtWnd->IsDisposed()); pTxtWnd->RemoveAccessibleTextData( *this ); + } if (mbEditEngineCreated && mpEditEngine) { @@ -1087,7 +1090,10 @@ void ScAccessibleEditLineTextData::Dispose() ScTextWnd* pTxtWnd = dynamic_cast<ScTextWnd*>(mpWindow.get()); if (pTxtWnd) + { + assert(!pTxtWnd->IsDisposed()); pTxtWnd->RemoveAccessibleTextData( *this ); + } ResetEditMode(); mpWindow = nullptr; |