aboutsummaryrefslogtreecommitdiff
path: root/src/game/MapManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/MapManager.cpp')
-rw-r--r--src/game/MapManager.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/game/MapManager.cpp b/src/game/MapManager.cpp
index b57f9b8d2c1..efc59aadbd1 100644
--- a/src/game/MapManager.cpp
+++ b/src/game/MapManager.cpp
@@ -358,12 +358,9 @@ void MapManager::InitMaxInstanceId()
{
i_MaxInstanceId = 0;
- QueryResult *result = CharacterDatabase.Query("SELECT MAX(id) FROM instance");
+ QueryResult_AutoPtr result = CharacterDatabase.Query("SELECT MAX(id) FROM instance");
if (result)
- {
i_MaxInstanceId = result->Fetch()[0].GetUInt32();
- delete result;
- }
}
uint32 MapManager::GetNumInstances()