diff --git a/changelog.txt b/changelog.txt index 09a93239a..b9f59ba88 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- == 03/05/2014 == demonstar55: Corrected rogue's evade to be single target +sorvani: fixed crash issue 119 == 03/04/2014 == Sorvani: Created RemoveFromInstance and RemoveAllFromInstance to remove a single player or all players in an instance. diff --git a/common/database.cpp b/common/database.cpp index 04e4d3b9a..4dcee568e 100644 --- a/common/database.cpp +++ b/common/database.cpp @@ -2522,10 +2522,11 @@ bool Database::GetUnusedInstanceID(uint16 &instance_id) safe_delete_array(query); if (mysql_num_rows(result) != 0) { row = mysql_fetch_row(result); - mysql_free_result(result); if(atoi(row[0]) <= max) { count = atoi(row[0]); + mysql_free_result(result); } else { + mysql_free_result(result); if (RunQuery(query, MakeAnyLenString(&query, "SELECT id FROM instance_list where id > %u ORDER BY id", count), errbuf, &result)) { safe_delete_array(query); if (mysql_num_rows(result) != 0) {