diff options
author | thenecromancer <none@none> | 2010-01-23 15:05:33 +0100 |
---|---|---|
committer | thenecromancer <none@none> | 2010-01-23 15:05:33 +0100 |
commit | 39ba392c7538db1bd18e617185c28420780e237c (patch) | |
tree | a620cd4b809816f697697af9478d6e538eb7cc5d /src/shared/Database/DBCStore.h | |
parent | 76102c1cdd0fc8bb473f9b3fd3965cea5a3794f6 (diff) | |
parent | d9cb0702158fd045285f2c0a904cb31a45a3864a (diff) |
Merge
--HG--
branch : trunk
Diffstat (limited to 'src/shared/Database/DBCStore.h')
-rw-r--r-- | src/shared/Database/DBCStore.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/shared/Database/DBCStore.h b/src/shared/Database/DBCStore.h index ea4ce109e27..4344b6e6450 100644 --- a/src/shared/Database/DBCStore.h +++ b/src/shared/Database/DBCStore.h @@ -83,7 +83,7 @@ class DBCStorage uint32 sqlRecordCount = 0; uint32 sqlHighestIndex = 0; Field *fields = NULL; - QueryResult *result = NULL; + QueryResult_AutoPtr result = QueryResult_AutoPtr(NULL); // Load data from sql if (sql) { @@ -188,7 +188,6 @@ class DBCStorage break; case FT_STRING: sLog.outError("Unsupported data type in table '%s' at char %d", sql->sqlTableName.c_str(), columnNumber); - delete result; return false; case FT_SORT: break; @@ -201,14 +200,12 @@ class DBCStorage else { sLog.outError("Incorrect sql format string '%s' at char %d", sql->sqlTableName.c_str(), columnNumber); - delete result; return false; } } if (sqlColumnNumber != (result->GetFieldCount()-1)) { sLog.outError("SQL and DBC format strings are not matching for table: '%s'", sql->sqlTableName.c_str()); - delete result; return false; } @@ -216,7 +213,6 @@ class DBCStorage ++rowIndex; }while (result->NextRow()); } - delete result; } // error in dbc file at loading if NULL |