Kaydet (Commit) 467887d3 authored tarafından Caolán McNamara's avatar Caolán McNamara

Related: tdf#100713 fix more recent bug to try and see older bug...

at the moment AddonsOptions::Notify is called with a null this
which crashes during adding an extension

regression from...

commit 3bdc5063
Date:   Wed Jun 22 02:30:43 2016 +0200

    tdf#89329: use shared_ptr for pImpl in addonsoptions

Change-Id: Ic28951e56bb8beca2a01ef2a1864eadcf3864e5b
üst efbe9597
...@@ -275,6 +275,8 @@ class AddonsOptions_Impl : public ConfigItem ...@@ -275,6 +275,8 @@ class AddonsOptions_Impl : public ConfigItem
Sequence< OUString > GetPropertyNamesImages( const OUString& aPropertyRootNode ) const; Sequence< OUString > GetPropertyNamesImages( const OUString& aPropertyRootNode ) const;
bool CreateImageFromSequence( Image& rImage, Sequence< sal_Int8 >& rBitmapDataSeq ) const; bool CreateImageFromSequence( Image& rImage, Sequence< sal_Int8 >& rBitmapDataSeq ) const;
DECL_LINK_TYPED(NotifyEvent, void*, void);
virtual void ImplCommit() override; virtual void ImplCommit() override;
// private member // private member
...@@ -409,7 +411,7 @@ void AddonsOptions_Impl::ReadConfigurationData() ...@@ -409,7 +411,7 @@ void AddonsOptions_Impl::ReadConfigurationData()
void AddonsOptions_Impl::Notify( const Sequence< OUString >& /*lPropertyNames*/ ) void AddonsOptions_Impl::Notify( const Sequence< OUString >& /*lPropertyNames*/ )
{ {
Application::PostUserEvent( LINK( nullptr, AddonsOptions, Notify ) ); Application::PostUserEvent(LINK(this, AddonsOptions_Impl, NotifyEvent));
} }
// public method // public method
...@@ -1613,10 +1615,10 @@ Mutex& AddonsOptions::GetOwnStaticMutex() ...@@ -1613,10 +1615,10 @@ Mutex& AddonsOptions::GetOwnStaticMutex()
return *pMutex; return *pMutex;
} }
IMPL_LINK_NOARG_TYPED( AddonsOptions, Notify, void*, void ) IMPL_LINK_NOARG_TYPED(AddonsOptions_Impl, NotifyEvent, void*, void)
{ {
MutexGuard aGuard( GetOwnStaticMutex() ); MutexGuard aGuard(AddonsOptions::GetOwnStaticMutex());
m_pImpl->ReadConfigurationData(); ReadConfigurationData();
} }
} }
......
...@@ -207,15 +207,6 @@ class FWE_DLLPUBLIC AddonsOptions ...@@ -207,15 +207,6 @@ class FWE_DLLPUBLIC AddonsOptions
static ::osl::Mutex& GetOwnStaticMutex(); static ::osl::Mutex& GetOwnStaticMutex();
/*-****************************************************************************************************
@short return a reference to a static mutex
@descr These class is partially threadsafe (for de-/initialization only).
All access methods are'nt safe!
We create a static mutex only for one ime and use at different times.
@return A reference to a static mutex member.
*//*-*****************************************************************************************************/
DECL_LINK_TYPED( Notify, void*, void );
private: private:
std::shared_ptr<AddonsOptions_Impl> m_pImpl; std::shared_ptr<AddonsOptions_Impl> m_pImpl;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment