summaryrefslogtreecommitdiff
path: root/sfx2/source/sidebar/UnoPanel.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/sidebar/UnoPanel.cxx')
-rw-r--r--sfx2/source/sidebar/UnoPanel.cxx11
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);
}