Skip to content

Commit

Permalink
actions: Fix door when no creature is in it (#3115)
Browse files Browse the repository at this point in the history
fixes #3102
  • Loading branch information
EPuncker committed Jul 2, 2020
1 parent 04aea08 commit 4f22476
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/actions/scripts/other/doors.lua
Expand Up @@ -86,7 +86,7 @@ function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if table.contains(horizontalOpenDoors, itemId) or table.contains(verticalOpenDoors, itemId) then
local creaturePositionTable = {}
local doorCreatures = Tile(toPosition):getCreatures()
if #doorCreatures > 0 then
if doorCreatures and #doorCreatures > 0 then
for _, doorCreature in pairs(doorCreatures) do
local pushPosition = findPushPosition(doorCreature, 1)
if not pushPosition then
Expand Down

0 comments on commit 4f22476

Please sign in to comment.