sw/source/uibase/utlui/content.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 65a468daafae43dec85d5e686029fa676d02343a
Author:     Jim Raykowski <rayk...@gmail.com>
AuthorDate: Tue Feb 4 15:19:26 2020 -0900
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Feb 5 07:13:45 2020 +0100

    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.gran...@collabora.co.uk>

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);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to