From bf1f49c837264c8f59197b9487d40e32821526c3 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Sat, 16 Jun 2018 18:08:44 +0200 Subject: Fix crash on deactivating Chart after playing around Change-Id: I55fab9213d3571e9457c1a0e0d68574ab4760d1e Reviewed-on: https://gerrit.libreoffice.org/55931 Tested-by: Jenkins Reviewed-by: Thorsten Behrens --- sfx2/source/sidebar/SidebarController.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 5763fe49db02..4f2b3e900d6a 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -1344,9 +1344,15 @@ tools::Rectangle SidebarController::GetDeckDragArea() const { tools::Rectangle aRect; - VclPtr pTitleBar = mpCurrentDeck->GetTitleBar(); - if ( pTitleBar) - aRect = pTitleBar->GetDragArea(); + if(mpCurrentDeck) + { + VclPtr pTitleBar(mpCurrentDeck->GetTitleBar()); + + if(pTitleBar) + { + aRect = pTitleBar->GetDragArea(); + } + } return aRect; } -- cgit