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 3bdc5063f942b9ea3b6e39e707926fbc516c19f9
Date:   Wed Jun 22 02:30:43 2016 +0200

    tdf#89329: use shared_ptr for pImpl in addonsoptions

Change-Id: Ic28951e56bb8beca2a01ef2a1864eadcf3864e5b
This commit is contained in:
Caolán McNamara 2016-07-07 21:05:07 +01:00
parent efbe959732
commit 467887d3c9
2 changed files with 6 additions and 13 deletions

View File

@ -275,6 +275,8 @@ class AddonsOptions_Impl : public ConfigItem
Sequence< OUString > GetPropertyNamesImages( const OUString& aPropertyRootNode ) const;
bool CreateImageFromSequence( Image& rImage, Sequence< sal_Int8 >& rBitmapDataSeq ) const;
DECL_LINK_TYPED(NotifyEvent, void*, void);
virtual void ImplCommit() override;
// private member
@ -409,7 +411,7 @@ void AddonsOptions_Impl::ReadConfigurationData()
void AddonsOptions_Impl::Notify( const Sequence< OUString >& /*lPropertyNames*/ )
{
Application::PostUserEvent( LINK( nullptr, AddonsOptions, Notify ) );
Application::PostUserEvent(LINK(this, AddonsOptions_Impl, NotifyEvent));
}
// public method
@ -1613,10 +1615,10 @@ Mutex& AddonsOptions::GetOwnStaticMutex()
return *pMutex;
}
IMPL_LINK_NOARG_TYPED( AddonsOptions, Notify, void*, void )
IMPL_LINK_NOARG_TYPED(AddonsOptions_Impl, NotifyEvent, void*, void)
{
MutexGuard aGuard( GetOwnStaticMutex() );
m_pImpl->ReadConfigurationData();
MutexGuard aGuard(AddonsOptions::GetOwnStaticMutex());
ReadConfigurationData();
}
}

View File

@ -207,15 +207,6 @@ class FWE_DLLPUBLIC AddonsOptions
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:
std::shared_ptr<AddonsOptions_Impl> m_pImpl;
};