From d18235cae43500d68210b09514b76506fc831014 Mon Sep 17 00:00:00 2001 From: Haru Date: Tue, 28 Oct 2014 15:52:53 +0100 Subject: Added preliminary support for login and char server in the HPMDataCheck - Special thanks to Ind Signed-off-by: Haru --- src/login/account_sql.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/login/account_sql.c') diff --git a/src/login/account_sql.c b/src/login/account_sql.c index 51e499369..996bfcf44 100644 --- a/src/login/account_sql.c +++ b/src/login/account_sql.c @@ -169,6 +169,10 @@ static bool account_db_sql_init(AccountDB* self) if( codepage[0] != '\0' && SQL_ERROR == SQL->SetEncoding(sql_handle, codepage) ) Sql_ShowDebug(sql_handle); + Sql_HerculesUpdateCheck(db->accounts); +#ifdef CONSOLE_INPUT + console->input->setSQL(db->accounts); +#endif return true; } @@ -655,11 +659,7 @@ static bool mmo_auth_tosql(AccountDB_SQL* db, const struct mmo_account* acc, boo Sql* account_db_sql_up(AccountDB* self) { AccountDB_SQL* db = (AccountDB_SQL*)self; - Sql_HerculesUpdateCheck(db->accounts); -#ifdef CONSOLE_INPUT - console->input->setSQL(db->accounts); -#endif - return db->accounts; + return db ? db->accounts : NULL; } void mmo_save_accreg2(AccountDB* self, int fd, int account_id, int char_id) { Sql* sql_handle = ((AccountDB_SQL*)self)->accounts; -- cgit v1.2.3-60-g2f50