diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-11-21 14:10:09 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-11-21 14:10:09 -0500 |
commit | 85b947dced10f5398055af36b5fdb6b8d32a6a6b (patch) | |
tree | efc2f877a6f41869a40b6d0a320e6d5c4fd591ca /src/SMAPI/Framework/ModLoading | |
parent | e20d26adcf7276c7f12ab9ab6ea0311953aa5194 (diff) | |
parent | a0cb83ed406fc0447e8edf00e680585005480d23 (diff) | |
download | SMAPI-85b947dced10f5398055af36b5fdb6b8d32a6a6b.tar.gz SMAPI-85b947dced10f5398055af36b5fdb6b8d32a6a6b.tar.bz2 SMAPI-85b947dced10f5398055af36b5fdb6b8d32a6a6b.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Framework/ModLoading')
-rw-r--r-- | src/SMAPI/Framework/ModLoading/Rewriters/HeuristicFieldRewriter.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/ModLoading/Rewriters/HeuristicFieldRewriter.cs b/src/SMAPI/Framework/ModLoading/Rewriters/HeuristicFieldRewriter.cs index ca04205c..f59a6ab1 100644 --- a/src/SMAPI/Framework/ModLoading/Rewriters/HeuristicFieldRewriter.cs +++ b/src/SMAPI/Framework/ModLoading/Rewriters/HeuristicFieldRewriter.cs @@ -68,7 +68,7 @@ namespace StardewModdingAPI.Framework.ModLoading.Rewriters private bool TryRewriteToProperty(ModuleDefinition module, Instruction instruction, FieldReference fieldRef, TypeDefinition declaringType, bool isRead) { // get equivalent property - PropertyDefinition property = declaringType.Properties.FirstOrDefault(p => p.Name == fieldRef.Name); + PropertyDefinition property = declaringType?.Properties.FirstOrDefault(p => p.Name == fieldRef.Name); MethodDefinition method = isRead ? property?.GetMethod : property?.SetMethod; if (method == null) return false; |