-Perform null check and add exception logging in RuleSet.

-Explicitly recognize connection termination on ServerOrder.Deserialize()
-Use explicit exception type for SDL2HardwareCursor failures.
This commit is contained in:
Peter Antal
2018-02-25 12:36:57 -08:00
committed by Paul Chote
parent f351f0346f
commit 8fa94c5301
3 changed files with 15 additions and 4 deletions

View File

@@ -227,10 +227,13 @@ namespace OpenRA
{
var traitName = traitNode.Key.Split('@')[0];
var traitType = modData.ObjectCreator.FindType(traitName + "Info");
if (traitType.GetInterface("ILobbyCustomRulesIgnore") == null)
if (traitType != null && traitType.GetInterface("ILobbyCustomRulesIgnore") == null)
return true;
}
catch { }
catch (Exception ex)
{
Log.Write("debug", "Error in AnyFlaggedTraits\r\n" + ex.ToString());
}
}
}