diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-07-06 18:39:20 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-07-07 00:25:11 +0200 |
commit | 2986f4baa8bdef1f9ab9108240ea890075321be1 (patch) | |
tree | 553b2da2aa5d488e9651e5709e12462fefef76f2 | |
parent | ad955de670c822c5462990ef36a35608eac88480 (diff) |
tdf#115890 sw: fix invalid cast in SwContentTree::GetEntryAltText()
AccessibleListBoxEntry calls this for any entry.
This was always broken but now we have asserts to tell us about it.
Change-Id: I7094a1dfbffd359e0f536ca60cba2478e2a62464
Reviewed-on: https://gerrit.libreoffice.org/57086
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Tested-by: Jenkins
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 9536891056d7..0dabe3cf9b4b 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -930,7 +930,7 @@ Size SwContentTree::GetOptimalSize() const OUString SwContentTree::GetEntryAltText( SvTreeListEntry* pEntry ) const { - if( pEntry == nullptr) + if (pEntry == nullptr || !lcl_IsContent(pEntry)) return OUString(); assert(pEntry->GetUserData() == nullptr || dynamic_cast<SwContent*>(static_cast<SwTypeNumber*>(pEntry->GetUserData()))); |