summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/itemdb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 669324532..c535b8674 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -134,7 +134,9 @@ int itemdb_group (int nameid)
*/
struct item_data* itemdb_exists(int nameid)
{
- struct item_data* id = idb_get(item_db,nameid);
+ struct item_data* id;
+ if (!nameid) return NULL;
+ id = idb_get(item_db,nameid);
// if (id == &dummy_item) return NULL; //Let dummy items go through... technically they "exist" because someone already has them...
return id;
}