diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2017-02-07 13:29:46 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2017-02-07 18:56:16 +0000 |
commit | 58d4a3122ce59c68aa7a4b7e09f76bf15865be9b (patch) | |
tree | 46a67d309214ed71e3a86abb1e65ce7964264741 /sfx2/source/sidebar/UnoPanel.cxx | |
parent | 555e1ff4cc84682ea73f9976f8e3c6f1d0f22590 (diff) |
tdf#104870 - keep reference on the TitleBar while setting title.
Unlikely to fix the issue, but may help.
Change-Id: I3c319f550e86f2ab731b072d86d258dca12d34fa
Reviewed-on: https://gerrit.libreoffice.org/33998
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sfx2/source/sidebar/UnoPanel.cxx')
-rw-r--r-- | sfx2/source/sidebar/UnoPanel.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sfx2/source/sidebar/UnoPanel.cxx b/sfx2/source/sidebar/UnoPanel.cxx index ac46f80a79e1..a382fe133b4c 100644 --- a/sfx2/source/sidebar/UnoPanel.cxx +++ b/sfx2/source/sidebar/UnoPanel.cxx @@ -48,12 +48,15 @@ OUString SAL_CALL SfxUnoPanel::getId() return mPanelId; } -OUString SAL_CALL SfxUnoPanel::getTitle() +OUString SAL_CALL SfxUnoPanel::getTitle() { SolarMutexGuard aGuard; - PanelTitleBar* pTitleBar = mpPanel->GetTitleBar(); - return pTitleBar->GetTitle(); + VclPtr<PanelTitleBar> pTitleBar = mpPanel->GetTitleBar(); + if (pTitleBar) + return pTitleBar->GetTitle(); + else + return OUString(); } void SAL_CALL SfxUnoPanel::setTitle( const OUString& newTitle ) @@ -66,7 +69,7 @@ void SAL_CALL SfxUnoPanel::setTitle( const OUString& newTitle ) if (xPanelDescriptor) { xPanelDescriptor->msTitle = newTitle; - PanelTitleBar* pTitleBar = mpPanel->GetTitleBar(); + VclPtr<PanelTitleBar> pTitleBar = mpPanel->GetTitleBar(); if (pTitleBar) pTitleBar->SetTitle(newTitle); } |