From c4520ddbe9b1917b1ca85b106b0c48d81aef59ce Mon Sep 17 00:00:00 2001 From: Dev Date: Mon, 12 Feb 2024 21:23:20 +0000 Subject: [PATCH] Protect again null quest object when trying to send a message during quest failure --- project/src/helpers/QuestHelper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/src/helpers/QuestHelper.ts b/project/src/helpers/QuestHelper.ts index 5d7fdabc..27c3eff6 100644 --- a/project/src/helpers/QuestHelper.ts +++ b/project/src/helpers/QuestHelper.ts @@ -712,7 +712,7 @@ export class QuestHelper { this.mailSendService.sendLocalisedNpcMessageToPlayer( sessionID, - this.traderHelper.getTraderById(quest.traderId), + this.traderHelper.getTraderById(quest?.traderId ?? matchingRepeatable.traderId), // can be null when repeatable quest has been moved to inactiveQuests MessageType.QUEST_FAIL, quest.failMessageText, questRewards,