diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-07-05 08:40:07 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-07-05 08:40:07 +0000 |
commit | 7007f5a0a07093d61ef84d04ab353cc525a09924 (patch) | |
tree | fd69384596c42682804276d340516b6b10082a74 /svx/source | |
parent | 22e230981453707ce3a0337e5919d17488807843 (diff) |
INTEGRATION: CWS drawres01 (1.14.658); FILE MERGED
2004/06/24 14:07:53 ka 1.14.658.1: #116603#: watch for NULL pointer
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/gallery2/gallery1.cxx | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index 74359665fcb9..3c6d27ac80c8 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -2,9 +2,9 @@ * * $RCSfile: gallery1.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: rt $ $Date: 2003-04-08 15:26:07 $ + * last change: $Author: rt $ $Date: 2004-07-05 09:40:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -317,11 +317,17 @@ void Gallery::ReleaseGallery( Gallery* pGallery ) if( pGallery == pEntry->GetGallery() ) pFound = pEntry; - DBG_ASSERT( pFound, "Gallery::ReleaseGallery(...): Gallery entry not found" ); - pFound->DecRefCount(); + if( pFound ) + { + pFound->DecRefCount(); - if( !pFound->GetRefCount() ) - delete (GalleryCacheEntry*) aGalleryCache.Remove( pFound ); + if( !pFound->GetRefCount() ) + delete (GalleryCacheEntry*) aGalleryCache.Remove( pFound ); + } + else + { + DBG_ERROR( "Gallery::ReleaseGallery(...): Gallery entry not found" ); + } } // ------------------------------------------------------------------------ |