From 765efd36fcadbc5df32f8fc2d7e8f4caf332ffbc Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 18 Feb 2015 09:49:22 +0100 Subject: [PATCH] DBG_ASSERT -> assert The only caller of GetResourceSkipHeader (BitmapEx ctor in vcl/source/gdi/bitmapex.cxx) unconditionally expects *ppResMgr to be non-null after the call. Change-Id: I17e71df81019de5b78c4356c7aec967c50a5a6ae --- tools/source/rc/resmgr.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx index 27d0cd71b9d0..6e0f34842254 100644 --- a/tools/source/rc/resmgr.cxx +++ b/tools/source/rc/resmgr.cxx @@ -1075,15 +1075,11 @@ void * ResMgr::GetResourceSkipHeader( const ResId& rResId, ResMgr ** ppResMgr ) { osl::Guard aGuard( getResMgrMutex() ); - DBG_ASSERT( rResId.GetResMgr(), "illegal ResId without ResMgr" ); *ppResMgr = rResId.GetResMgr(); - if( *ppResMgr ) - { - (*ppResMgr)->GetResource( rResId ); - (*ppResMgr)->Increment( sizeof( RSHEADER_TYPE ) ); - return (*ppResMgr)->GetClass(); - } - return getEmptyBuffer(); + assert(*ppResMgr != nullptr); + (*ppResMgr)->GetResource( rResId ); + (*ppResMgr)->Increment( sizeof( RSHEADER_TYPE ) ); + return (*ppResMgr)->GetClass(); } void ResMgr::PopContext( const Resource* pResObj )