From 3c3b7ec13d0c4fea3b335c989033042544ab39eb Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sun, 21 Feb 2016 12:51:31 +0100 Subject: SCI: Skip NULL entries in FindByObject Lists can contain gaps if they're searched before Pack() is called. --- engines/sci/graphics/lists32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/sci/graphics/lists32.h b/engines/sci/graphics/lists32.h index f745a2cb6d..bb990e17ca 100644 --- a/engines/sci/graphics/lists32.h +++ b/engines/sci/graphics/lists32.h @@ -184,7 +184,7 @@ class FindByObject { public: FindByObject(const reg_t &object) : _object(object) {} bool operator()(const T entry) const { - return entry->_object == _object; + return entry && entry->_object == _object; } }; -- cgit v1.2.3