]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Inventory: check for null
authorTimePath <andrew.hardaker1995@gmail.com>
Fri, 25 Mar 2016 05:05:24 +0000 (16:05 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Fri, 25 Mar 2016 05:05:24 +0000 (16:05 +1100)
Fixes #1688

qcsrc/common/items/inventory.qh

index 96c7319b7d0fbb9ae0e8a1e674aebb668036f146..934271059ba55ed6cc464e9c7122cdd970bc65eb 100644 (file)
@@ -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, {