From 7010575075721c2b56b41f6517420249e520b5c9 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Thu, 5 Jul 2018 02:05:10 +0300 Subject: [PATCH] [Server] Return -1 in GetObjectSummonerPid() when the player is invalid --- apps/openmw-mp/Script/Functions/Objects.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/openmw-mp/Script/Functions/Objects.cpp b/apps/openmw-mp/Script/Functions/Objects.cpp index f965f8a15..de7fe0d80 100644 --- a/apps/openmw-mp/Script/Functions/Objects.cpp +++ b/apps/openmw-mp/Script/Functions/Objects.cpp @@ -134,6 +134,8 @@ unsigned int ObjectFunctions::GetObjectSummonerPid(unsigned int i) noexcept if (player != nullptr) return player->getId(); + + return -1; } const char *ObjectFunctions::GetObjectSummonerRefId(unsigned int i) noexcept