summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2017-01-05 11:27:23 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2017-01-05 11:37:27 +0200
commit82c9dbe2a015a16e8e3525daab77967a90858f14 (patch)
treed95deec5b3dc56a3fb59f6dddf8b06d0ac87f2b2 /vcl
parent9152f16b7901af6bceaa296b8e0fc171ee5fe03c (diff)
Improve last commit
Change-Id: I4feb71c9117e13f18e2c5215714fd0170f166b64
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/notebookbar.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/vcl/source/control/notebookbar.cxx b/vcl/source/control/notebookbar.cxx
index 1a1de0208da8..837c5150d9cc 100644
--- a/vcl/source/control/notebookbar.cxx
+++ b/vcl/source/control/notebookbar.cxx
@@ -52,10 +52,8 @@ NotebookBar::~NotebookBar()
void NotebookBar::dispose()
{
if (m_pSystemWindow && m_pSystemWindow->ImplIsInTaskPaneList(this))
- {
m_pSystemWindow->GetTaskPaneList()->RemoveWindow(this);
- m_pSystemWindow.clear();
- }
+ m_pSystemWindow.clear();
disposeBuilder();
m_pEventListener.clear();
Control::dispose();
@@ -117,10 +115,7 @@ void NotebookBar::SetIconClickHdl(Link<NotebookBar*, void> aHdl)
void NotebookBar::SetSystemWindow(SystemWindow* pSystemWindow)
{
- if (m_pSystemWindow)
- m_pSystemWindow.clear();
-
- m_pSystemWindow = VclPtr<SystemWindow>(pSystemWindow);
+ m_pSystemWindow = pSystemWindow;
if (!m_pSystemWindow->ImplIsInTaskPaneList(this))
m_pSystemWindow->GetTaskPaneList()->AddWindow(this);
}