summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index e4085c48f..fe435d73f 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -490,7 +490,7 @@ int pc_setinventorydata(struct map_session_data *sd)
for(i=0;i<MAX_INVENTORY;i++) {
id = sd->status.inventory[i].nameid;
- sd->inventory_data[i] = itemdb_search(id);
+ sd->inventory_data[i] = id?itemdb_search(id):NULL;
}
return 0;
}