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
master
silvernexus 2020-12-20 03:54:58 +00:00
parent d10fdbe1a7
commit a05c8eb384
2 changed files with 6 additions and 0 deletions

View File

@ -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.

View File

@ -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: