Fixes bad expressions, bad bool checks in loops, a few null pointer exceptions, and optimizes constructors.
This commit is contained in:
parent
8da55d6043
commit
f93c3b992e
62 changed files with 318 additions and 634 deletions
|
|
@ -72,11 +72,12 @@ namespace Server.RemoteAdmin
|
|||
{
|
||||
LazyInitialize();
|
||||
|
||||
if (!Enabled) return;
|
||||
if (!Enabled)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
Account acct = state.Account as Account;
|
||||
Account acct = state?.Account as Account;
|
||||
string name = acct == null ? "(UNKNOWN)" : acct.Username;
|
||||
string accesslevel = acct == null ? "NoAccount" : acct.AccessLevel.ToString();
|
||||
string statestr = state == null ? "NULLSTATE" : state.ToString();
|
||||
|
|
@ -97,6 +98,7 @@ namespace Server.RemoteAdmin
|
|||
}
|
||||
catch
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue