From 0b18b8977b1ec3be33143eb0701ec6e7a1fb1fef Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Sun, 2 May 2021 00:46:24 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20items.cpp:=20Fix=20nullopt=20acc?= =?UTF-8?q?ess?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A better fix would probably be to not call this function in the first place before the graphics are loaded. --- Source/items.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/items.cpp b/Source/items.cpp index 44de9c77f..1889aba01 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -2257,7 +2257,7 @@ void SetupItem(int i) int it; it = ItemCAnimTbl[items[i]._iCurs]; - items[i]._iAnimData = &*itemanims[it]; + items[i]._iAnimData = itemanims[it] ? &*itemanims[it] : nullptr; items[i]._iAnimLen = ItemAnimLs[it]; items[i]._iAnimWidth = ItemAnimWidth; items[i]._iIdentified = false;