From be10dd378cea478c958d68aea2bda9232ae4ce75 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 17 Apr 2016 11:03:05 +0200 Subject: GNAP: Remove useless return after an error --- engines/gnap/resource.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/gnap/resource.h b/engines/gnap/resource.h index 73cee761c6..7235351f65 100644 --- a/engines/gnap/resource.h +++ b/engines/gnap/resource.h @@ -171,10 +171,9 @@ protected: } ResourceClass *load(int resourceId) { - if (_dat->getResourceType(resourceId) != ResourceType) { + if (_dat->getResourceType(resourceId) != ResourceType) error("ResourceCache::load() Wrong resource type: Expected %d, got %d", ResourceType, _dat->getResourceType(resourceId)); - return nullptr; - } + byte *resourceData = _dat->loadResource(resourceId); uint32 resourceSize = _dat->getResourceSize(resourceId); ResourceClass *obj = new ResourceClass(resourceId, resourceData, resourceSize); -- cgit v1.2.3