From 4372a14479765b1114564587170dd1c1b782362c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 29 Nov 2016 20:28:04 +0100 Subject: [PATCH] - fixed: Giving several morph items in the same tic could lead to an invalid Owner pointer in APowerupGiver::Use. --- src/g_shared/a_artifacts.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/g_shared/a_artifacts.cpp b/src/g_shared/a_artifacts.cpp index 99a4f46d8..5866e8b2a 100644 --- a/src/g_shared/a_artifacts.cpp +++ b/src/g_shared/a_artifacts.cpp @@ -72,6 +72,7 @@ DEFINE_FIELD(APowerupGiver, Strength) bool APowerupGiver::Use (bool pickup) { if (PowerupType == NULL) return true; // item is useless + if (Owner == nullptr) return true; APowerup *power = static_cast (Spawn (PowerupType));