From 3e7fd80993f7fccdcd1d4ac70be74a28485876de Mon Sep 17 00:00:00 2001 From: FlavioJS Date: Fri, 28 Sep 2007 18:26:55 +0000 Subject: * Changed back the query to get the friends of a character to a LEFT JOIN. * Setting the item script variables to NULL when they are freed. (bugreport:142 ?) (a double @reloaditemdb might result in a double free) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11328 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/itemdb.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/map/itemdb.c') diff --git a/src/map/itemdb.c b/src/map/itemdb.c index f6cdf6b3f..91eaeafce 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -769,11 +769,20 @@ static bool itemdb_parse_dbrow(char** str, char* source, int line) id->sex = itemdb_gendercheck(id); //Apply gender filtering. if (id->script) + { script_free_code(id->script); + id->script = NULL; + } if (id->equip_script) + { script_free_code(id->equip_script); + id->equip_script = NULL; + } if (id->unequip_script) + { script_free_code(id->unequip_script); + id->unequip_script = NULL; + } if (*str[19]) id->script = parse_script(str[19], source, line, 0); -- cgit v1.2.3-70-g09d2