From 99ca6499308a8df3c629c2f31cadb233b40b60f4 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 11 Apr 2016 20:42:43 +0200 Subject: [PATCH] - fixed NULL pointer access in SetAmmoCapacity. --- src/p_acs.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 00b3229b2..c880d87bf 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -8637,8 +8637,11 @@ scriptwait: else { item = activator->GiveInventoryType (static_cast(type)); - item->MaxAmount = STACK(1); - item->Amount = 0; + if (item != NULL) + { + item->MaxAmount = STACK(1); + item->Amount = 0; + } } } }