diff options
| author | Xanadu <none@none> | 2010-05-29 03:16:39 +0200 |
|---|---|---|
| committer | Xanadu <none@none> | 2010-05-29 03:16:39 +0200 |
| commit | d104f19469f9a63636f16e0d0765cd6798bccf4b (patch) | |
| tree | 200c4bb985b503d082a889722bafc3733776e831 /src/shared | |
| parent | de97bd4f00df0265d1c352611d40d82ffacf45d4 (diff) | |
*Properly initialize members to prevent DB logging before the DB is started. Fixes a rarely seen startup crash.
*Code cleanup.
--HG--
branch : trunk
Diffstat (limited to 'src/shared')
| -rw-r--r-- | src/shared/Database/Database.cpp | 2 | ||||
| -rw-r--r-- | src/shared/Log.cpp | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/shared/Database/Database.cpp b/src/shared/Database/Database.cpp index 73924b485ce..379388d7997 100644 --- a/src/shared/Database/Database.cpp +++ b/src/shared/Database/Database.cpp @@ -39,7 +39,7 @@ size_t Database::db_count = 0; -Database::Database() +Database::Database() : mMysql(NULL) { // before first connection if (db_count++ == 0) diff --git a/src/shared/Log.cpp b/src/shared/Log.cpp index d35b25a9069..187b9eaa79b 100644 --- a/src/shared/Log.cpp +++ b/src/shared/Log.cpp @@ -31,8 +31,9 @@ INSTANTIATE_SINGLETON_1( Log ); Log::Log() : raLogfile(NULL), logfile(NULL), gmLogfile(NULL), charLogfile(NULL), - dberLogfile(NULL), chatLogfile(NULL), m_gmlog_per_account(false), m_colored(false) - , arenaLogFile(NULL) + dberLogfile(NULL), chatLogfile(NULL), m_gmlog_per_account(false), + m_enableLogDBLater(false), m_enableLogDB(false), m_colored(false), + arenaLogFile(NULL) { Initialize(); } |
