From 1117412fd263f8ab4a045bb65294d67d6e0d772d Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sun, 31 Jan 2021 15:26:59 +0100 Subject: [PATCH] Handle inactive towners --- Source/towners.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/towners.cpp b/Source/towners.cpp index e696a4b95..c96102b47 100644 --- a/Source/towners.cpp +++ b/Source/towners.cpp @@ -519,6 +519,9 @@ void TownCtrlMsg(int i) int p; int dx, dy; + if (i == -1) + return; + if (towner[i]._tbtcnt != 0) { p = towner[i]._tVar1; dx = abs(towner[i]._tx - plr[p]._px);