aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordanik <danik.wow@gmail.com>2012-01-06 17:49:15 +0100
committerdanik <danik.wow@gmail.com>2012-01-06 17:49:15 +0100
commit803acccb0723143e95df107eaf04477c791702a4 (patch)
treed3e7046605d37d78d1725b9833c3135c6264335f /src
parenta79ea3dcdfc865896bd120edc864105685fc43f4 (diff)
Command/Account: fixed crash when creating account from console
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Commands/cs_account.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp
index bd415c0f79f..ac265acbf71 100644
--- a/src/server/scripts/Commands/cs_account.cpp
+++ b/src/server/scripts/Commands/cs_account.cpp
@@ -109,7 +109,8 @@ public:
{
case AOR_OK:
handler->PSendSysMessage(LANG_ACCOUNT_CREATED, accountName);
- sLog->outChar("Account: %d (IP: %s) Character:[%s] (GUID: %u) Change Password.", handler->GetSession()->GetAccountId(),handler->GetSession()->GetRemoteAddress().c_str(), handler->GetSession()->GetPlayer()->GetName(), handler->GetSession()->GetPlayer()->GetGUIDLow());
+ if (handler->GetSession())
+ sLog->outChar("Account: %d (IP: %s) Character:[%s] (GUID: %u) Change Password.", handler->GetSession()->GetAccountId(),handler->GetSession()->GetRemoteAddress().c_str(), handler->GetSession()->GetPlayer()->GetName(), handler->GetSession()->GetPlayer()->GetGUIDLow());
break;
case AOR_NAME_TOO_LONG:
handler->SendSysMessage(LANG_ACCOUNT_TOO_LONG);