From a05c8eb38457263db4411f7e55d8b14573427fdf Mon Sep 17 00:00:00 2001 From: silvernexus Date: Sun, 20 Dec 2020 03:54:58 +0000 Subject: [PATCH] Fix potential for NoneType as player if Owner is null on non-player activator. git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@21627 282e977c-c81d-0410-88c4-b93c2d0d6712 --- ChangeLog | 3 +++ python/quests/QuestAdvance.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8d7ad4235..e5a2f93ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2020-12-19 Daniel Hawkins: + * python/quests/QuestAdvance.py: Bail from method if non-player activator has no owner. + 2020-12-17 Nicolas Weeger * /scorn/houses/resir: Move exit under an extra grass column on the right, for coherence. * scorn/temples/valkyrie: Fix stairs coordinates. diff --git a/python/quests/QuestAdvance.py b/python/quests/QuestAdvance.py index 4dcd8e996..3940f4602 100644 --- a/python/quests/QuestAdvance.py +++ b/python/quests/QuestAdvance.py @@ -52,6 +52,9 @@ def handle(): return # if a spell was used, then the killer is the spell object, find the owner if player.Type != Crossfire.Type.PLAYER: + # If the non-player has no owner, then no quest changes. + if player.Owner is None: + return player = player.Owner if player.Type != Crossfire.Type.PLAYER: