From: TimePath Date: Fri, 25 Mar 2016 05:05:24 +0000 (+1100) Subject: Inventory: check for null X-Git-Tag: xonotic-v0.8.2~1019 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7b134062472589d02b9e7a0e5724047bd8b1776d;p=xonotic%2Fxonotic-data.pk3dir.git Inventory: check for null Fixes #1688 --- diff --git a/qcsrc/common/items/inventory.qh b/qcsrc/common/items/inventory.qh index 96c7319b7..934271059 100644 --- a/qcsrc/common/items/inventory.qh +++ b/qcsrc/common/items/inventory.qh @@ -34,6 +34,10 @@ NET_HANDLE(ENT_CLIENT_INVENTORY, bool isnew) #ifdef SVQC void Inventory_Write(Inventory data) { + if (!data) { + WriteInt24_t(MSG_ENTITY, 0); + return; + } TC(Inventory, data); int bits = 0; FOREACH(Items, true, {