Don't add null TryCatchOperations

This commit is contained in:
Westin Miller
2018-10-23 14:22:11 -07:00
committed by GitHub
parent bdaa674662
commit f1201c6259

View File

@@ -112,7 +112,8 @@ namespace Torch.Managers.PatchManager.MSIL
set set
{ {
TryCatchOperations.Clear(); TryCatchOperations.Clear();
TryCatchOperations.Add(value); if (value != null)
TryCatchOperations.Add(value);
} }
} }
@@ -237,4 +238,4 @@ namespace Torch.Managers.PatchManager.MSIL
/// </summary> /// </summary>
public int MaxBytes => 2 + (Operand?.MaxBytes ?? 0); public int MaxBytes => 2 + (Operand?.MaxBytes ?? 0);
} }
} }