From 82c9dbe2a015a16e8e3525daab77967a90858f14 Mon Sep 17 00:00:00 2001 From: Maxim Monastirsky Date: Thu, 5 Jan 2017 11:27:23 +0200 Subject: Improve last commit Change-Id: I4feb71c9117e13f18e2c5215714fd0170f166b64 --- vcl/source/control/notebookbar.cxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'vcl') 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 aHdl) void NotebookBar::SetSystemWindow(SystemWindow* pSystemWindow) { - if (m_pSystemWindow) - m_pSystemWindow.clear(); - - m_pSystemWindow = VclPtr(pSystemWindow); + m_pSystemWindow = pSystemWindow; if (!m_pSystemWindow->ImplIsInTaskPaneList(this)) m_pSystemWindow->GetTaskPaneList()->AddWindow(this); } -- cgit