summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-07-24 09:15:50 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-07-24 13:30:03 +0200
commit48c78c3abba301d1dd197be75958d380913b481f (patch)
tree662679ca93eeed5547bb0bf113abedaafc14fa0f /svx
parentbb748ba4a4a1ff5d653f20871a1dc51e2efdc9a7 (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.cxx6
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();
+ }
}
}