diff options
author | Jim Raykowski <raykowj@gmail.com> | 2020-02-04 15:19:26 -0900 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-02-05 07:13:45 +0100 |
commit | 65a468daafae43dec85d5e686029fa676d02343a (patch) | |
tree | 57eacfab6794a1636041d68a48ceaaf15344aa6f /sw | |
parent | fcf39ae78e02db89dc5969b93a91c992c9924b57 (diff) |
correct cast used for type id of content
A not always reproducible crash occurs when delete key is used in the
Navigator. I have only noticed it for table delete. I believe this is
caused by casting user data to SwContentType when it is actually
SwContent. This patch changes the cast to SwContent.
Change-Id: Ia7f59b3e8141c7dee7188276d6cd6722a3678922
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87992
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-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 2a7826babbdf..bb9258bc5599 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -3051,7 +3051,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent) if (static_cast<SwContent*>(pEntry->GetUserData())->GetParent()->IsDeletable() && !m_pActiveShell->GetView().GetDocShell()->IsReadOnly()) { - if (static_cast<SwContentType*>(pEntry->GetUserData())->GetType() == ContentTypeId::OUTLINE) + if (static_cast<SwContent*>(pEntry->GetUserData())->GetParent()->GetType() == ContentTypeId::OUTLINE) DeleteOutlineSelections(); else EditEntry(pEntry, EditEntryMode::DELETE); |