]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/items/item.qh
q3compat: Fix null function crash when a weapon has no ammo_type
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / item.qh
index 5c6ec494a3d33bd92536aa5a701d7d8da2971514..26f89cad5f45f598e7f13ae119db9eadab882ae5 100644 (file)
@@ -65,7 +65,7 @@ const int ITS_GLOW              = BIT(6);
 .float invincible_finished; // ditto
 
 #define spawnfunc_body(item) \
-       if (!Item_IsDefinitionAllowed(item)) \
+       if (!(item) || !Item_IsDefinitionAllowed(item)) \
        { \
                startitem_failed = true; \
                delete(this); \