diff options
-rw-r--r-- | svx/source/gallery2/gallery1.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index 4f5d371262b1..eb847b8e2bde 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -182,18 +182,18 @@ Gallery::~Gallery() Gallery* Gallery::GetGalleryInstance() { - static Gallery* pGallery = nullptr; + static Gallery* s_pGallery = nullptr; - if( !pGallery ) + if (!s_pGallery) { ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if( !pGallery ) + if (!s_pGallery) { - pGallery = new Gallery( SvtPathOptions().GetGalleryPath() ); + s_pGallery = new Gallery( SvtPathOptions().GetGalleryPath() ); } } - return pGallery; + return s_pGallery; } void Gallery::ImplLoad( const OUString& rMultiPath ) |