summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/ViewTabBar.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/view/ViewTabBar.cxx')
-rw-r--r--sd/source/ui/view/ViewTabBar.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sd/source/ui/view/ViewTabBar.cxx b/sd/source/ui/view/ViewTabBar.cxx
index fd8c83f8841c..19722039877b 100644
--- a/sd/source/ui/view/ViewTabBar.cxx
+++ b/sd/source/ui/view/ViewTabBar.cxx
@@ -66,6 +66,9 @@ ViewTabBar::ViewTabBar (
mpViewShellBase(nullptr),
mnNoteBookWidthPadding(0)
{
+ // Do this manually instead of via uno::Reference, so we don't delete ourselves.
+ osl_atomic_increment(&m_refCount);
+
// Tunnel through the controller and use the ViewShellBase to obtain the
// view frame.
try
@@ -100,6 +103,8 @@ ViewTabBar::ViewTabBar (
{
mpViewShellBase->SetViewTabBar(this);
}
+
+ osl_atomic_decrement(&m_refCount);
}
ViewTabBar::~ViewTabBar()