summaryrefslogtreecommitdiff
path: root/src/map/pet.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-18 17:36:03 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-18 17:36:03 +0000
commit8d56be481198093229a7b0febb0231475f4c10f5 (patch)
tree8bad2602c44f47917ad9a052c04fea59232013d2 /src/map/pet.c
parenta625c96cd44bc95bdc1d8bc9e2143372fb28c56e (diff)
downloadhercules-8d56be481198093229a7b0febb0231475f4c10f5.tar.gz
hercules-8d56be481198093229a7b0febb0231475f4c10f5.tar.bz2
hercules-8d56be481198093229a7b0febb0231475f4c10f5.tar.xz
hercules-8d56be481198093229a7b0febb0231475f4c10f5.zip
* Fixed a crash when freeing memory of pets
* Added Cygwin support to the -DDUMPSTACK option, and changed its format * Removed duplicate fopen in login_log git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1250 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pet.c')
-rw-r--r--src/map/pet.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/pet.c b/src/map/pet.c
index a8e99df6c..553f64044 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -610,7 +610,8 @@ int pet_remove_map(struct map_session_data *sd)
pet_hungry_timer_delete(sd);
clif_clearchar_area(&sd->pd->bl,0);
map_delblock(&sd->pd->bl);
- free(sd->pd->lootitem);
+ if (sd->pd->lootitem)
+ aFree(sd->pd->lootitem);
map_deliddb(&sd->pd->bl);
}
return 0;