summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-24 21:46:27 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-24 21:46:27 +0300
commite2fec6a64a403df523d64540f70c73b99fbf491c (patch)
tree34ee4d272252990071bd84cff303b956e4b57c21 /src/map/pc.c
parentcf9c4ca35fefcf392269179785371b679689364c (diff)
downloadevol-hercules-e2fec6a64a403df523d64540f70c73b99fbf491c.tar.gz
evol-hercules-e2fec6a64a403df523d64540f70c73b99fbf491c.tar.bz2
evol-hercules-e2fec6a64a403df523d64540f70c73b99fbf491c.tar.xz
evol-hercules-e2fec6a64a403df523d64540f70c73b99fbf491c.zip
map: add missing checks.
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 612393f..b4de8c4 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -75,6 +75,9 @@ void epc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int *p
{
int pos = *posPtr;
+ if (!id)
+ return;
+
equipPos(EQP_HEAD_LOW, head_bottom, LOOK_HEAD_BOTTOM);
equipPos(EQP_HEAD_TOP, head_top, LOOK_HEAD_TOP);
equipPos(EQP_HEAD_MID, head_mid, LOOK_HEAD_MID);
@@ -111,6 +114,9 @@ void epc_unequipitem_pos(struct map_session_data *sd,
int *nPtr __attribute__ ((unused)),
int *posPtr)
{
+ if (!sd)
+ return;
+
int pos = *posPtr;
unequipPos(EQP_HEAD_LOW, head_bottom, LOOK_HEAD_BOTTOM);