summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/basidesh.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 596e1e973b2f..8814f3538161 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -998,15 +998,15 @@ void BasicIDEShell::SetCurLib( const ScriptDocument& rDocument, String aLibName,
{
ContainerListenerImpl* pListener = static_cast< ContainerListenerImpl* >( m_xLibListener.get() );
- if ( pListener )
- pListener->removeContainerListener( m_aCurDocument, m_aCurLibName );
-
m_aCurDocument = rDocument;
-
- pListener->addContainerListener( m_aCurDocument, aLibName );
-
m_aCurLibName = aLibName;
+ if ( pListener )
+ {
+ pListener->removeContainerListener( m_aCurDocument, m_aCurLibName );
+ pListener->addContainerListener( m_aCurDocument, aLibName );
+ }
+
if ( bUpdateWindows )
UpdateWindows();