From 966ffe4377ae4297737f384fc86253fa46608ee0 Mon Sep 17 00:00:00 2001 From: nordsoft Date: Wed, 18 Oct 2023 00:13:32 +0200 Subject: [PATCH] Fix warnings about empty kill target --- lib/mapObjects/CQuest.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/mapObjects/CQuest.cpp b/lib/mapObjects/CQuest.cpp index 85e154128..69eefc237 100644 --- a/lib/mapObjects/CQuest.cpp +++ b/lib/mapObjects/CQuest.cpp @@ -423,6 +423,9 @@ void IQuestObject::afterAddToMapCommon(CMap * map) const void CGSeerHut::setObjToKill() { + if(quest->killTarget == ObjectInstanceID::NONE) + return; + if(getCreatureToKill(true)) { quest->stackToKill = getCreatureToKill(false)->getStack(SlotID(0)); //FIXME: stacks tend to disappear (desync?) on server :?