summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2015-02-05 20:10:37 +0100
committerJulien Nabet <serval2412@yahoo.fr>2015-02-05 21:08:44 +0100
commitc20a2234c5cb9cb89611de8a8a34e9d1e7c7a972 (patch)
tree44c98998eb1fefb87e243dca9983290515f195ca
parent101ea2fe4bd4ad27d43af2e326b9ff346a2ce9cb (diff)
cppcheck: Returning/dereferencing 'pEntry' after it is deallocated / released
Change-Id: If96b66d5bbfcf4426bb602909599cd36e1f3c994
-rw-r--r--svx/source/gallery2/galtheme.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 7abdc6d1f611..2bf184f4c559 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -477,6 +477,7 @@ bool GalleryTheme::RemoveObject( size_t nPos )
Broadcast( GalleryHint( GALLERY_HINT_CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) );
Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) );
delete pEntry;
+ pEntry = NULL;
ImplSetModified( true );
ImplBroadcast( nPos );