diff options
-rw-r--r-- | svtools/source/graphic/grfmgr2.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index f4696234e9f9..3aabb528f3b0 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -167,12 +167,13 @@ void GraphicManager::ImplUnregisterObj( const GraphicObject& rObj ) { if ( *it == &rObj ) { maObjList.erase( it ); + + if( !rObj.IsSwappedOut() ) + mnUsedSize -= rObj.GetSizeBytes(); return; } } assert(false); // surely it should have been registered? - if( !rObj.IsSwappedOut() ) - mnUsedSize -= rObj.GetSizeBytes(); } void GraphicManager::ImplGraphicObjectWasSwappedOut( const GraphicObject& rObj ) |