tdf#113855 Assertion while customizing Bullets and Numbering

can't find an easy way of removing the duplication, even though
that BeginLocking() stuff looks ripe for simplification.

Change-Id: I97b580b3668381c12b62136ea09772d91ab11eac
Reviewed-on: https://gerrit.libreoffice.org/44884
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index c089ba0..c3d32d6f 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -763,7 +763,7 @@ GalleryTheme* Gallery::AcquireTheme( const OUString& rThemeName, SfxListener& rL
    GalleryThemeEntry*      pThemeEntry = ImplGetThemeEntry( rThemeName );

    if( pThemeEntry && ( ( pTheme = ImplGetCachedTheme( pThemeEntry ) ) != nullptr ) )
        rListener.StartListening( *pTheme );
        rListener.StartListening( *pTheme, true );

    return pTheme;
}