diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-07-24 09:15:50 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-07-24 13:30:03 +0200 |
commit | 48c78c3abba301d1dd197be75958d380913b481f (patch) | |
tree | 662679ca93eeed5547bb0bf113abedaafc14fa0f /svx | |
parent | bb748ba4a4a1ff5d653f20871a1dc51e2efdc9a7 (diff) |
cid#1448545 silence Wrapper object use after free
Change-Id: Ia1b3137916ae37ed73ac9923af847aa15978dc86
Reviewed-on: https://gerrit.libreoffice.org/76228
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/gallery2/gallery1.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index 79fd2a487d5f..1ee0d7edbf0f 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -717,9 +717,11 @@ GalleryTheme* Gallery::ImplGetCachedTheme(const GalleryThemeEntry* pThemeEntry) } } - pTheme = pNewTheme.get(); - if( pTheme ) + if (pNewTheme) + { aThemeCache.push_back( new GalleryThemeCacheEntry( pThemeEntry, std::move(pNewTheme) )); + pTheme = aThemeCache.back()->GetTheme(); + } } } |