summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2015-02-05 20:10:37 +0100
committerMichael Stahl <mstahl@redhat.com>2015-02-06 14:32:28 +0000
commit7153844e964f1e8895d6ac7b202147729ede997d (patch)
tree92a31fae6076092b926b5c60d6708b0f52764819
parent76682f53a4dbcd12b9d0c02a3bc6e264c32651af (diff)
cppcheck: Returning/dereferencing 'pEntry' after it is deallocated / released
Cherry-picked from c20a2234c5cb9cb89611de8a8a34e9d1e7c7a972 Change-Id: If96b66d5bbfcf4426bb602909599cd36e1f3c994 Reviewed-on: https://gerrit.libreoffice.org/14350 Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-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 cf644489752f..90f734d463f9 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 );