diff options
Diffstat (limited to 'sfx2/source/appl/appcfg.cxx')
-rw-r--r-- | sfx2/source/appl/appcfg.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index ee45f9da2661..f18b93792236 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -66,6 +66,7 @@ public: virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; explicit SfxEventAsyncer_Impl(const SfxEventHint& rHint); + ~SfxEventAsyncer_Impl(); DECL_LINK( IdleHdl, Timer*, void ); }; @@ -93,6 +94,13 @@ SfxEventAsyncer_Impl::SfxEventAsyncer_Impl( const SfxEventHint& rHint ) } +SfxEventAsyncer_Impl::~SfxEventAsyncer_Impl() +{ + if (aHint.GetObjShell()) + EndListening(*aHint.GetObjShell()); +} + + IMPL_LINK(SfxEventAsyncer_Impl, IdleHdl, Timer*, pAsyncIdle, void) { SfxObjectShellRef xRef( aHint.GetObjShell() ); @@ -325,7 +333,7 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet) void SfxApplication::NotifyEvent( const SfxEventHint& rEventHint, bool bSynchron ) { - SfxObjectShell *pDoc = rEventHint.GetObjShell(); + rtl::Reference<SfxObjectShell> pDoc = rEventHint.GetObjShell(); if ( pDoc && ( pDoc->IsPreview() || !pDoc->Get_Impl()->bInitialized ) ) return; |