summaryrefslogtreecommitdiff
path: root/src/map/mapreg_sql.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-01-11 18:22:42 -0200
committershennetsind <ind@henn.et>2014-01-11 18:23:27 -0200
commit65a55ea396c44e263481302f8016fcf8b0e47a70 (patch)
treed0bde72f18534bdfe997b617620e19109b39324b /src/map/mapreg_sql.c
parentab942065240450c3d2824a8a307f8a1b9bcf9516 (diff)
downloadhercules-65a55ea396c44e263481302f8016fcf8b0e47a70.tar.gz
hercules-65a55ea396c44e263481302f8016fcf8b0e47a70.tar.bz2
hercules-65a55ea396c44e263481302f8016fcf8b0e47a70.tar.xz
hercules-65a55ea396c44e263481302f8016fcf8b0e47a70.zip
Follow up 82b583b5ef4e729ad2c3c74b26adce16a145605a
Fixed mapreg reload issue, sql_query not returning results, and caused deletearray to no longer display error messages when the array in question is not available. Special Thanks to Haruna, ossi0110 Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/mapreg_sql.c')
-rw-r--r--src/map/mapreg_sql.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c
index 6df614aac..c2a35f930 100644
--- a/src/map/mapreg_sql.c
+++ b/src/map/mapreg_sql.c
@@ -263,8 +263,11 @@ void mapreg_reload(void) {
db_clear(mapreg->db);
db_clear(mapreg->str_db);
- if( mapreg->array_db )
+ if( mapreg->array_db ) {
mapreg->array_db->destroy(mapreg->array_db,script->array_free_db);
+ mapreg->array_db = NULL;
+ }
+
mapreg->load();
}