summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ModLoading
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-11-21 14:10:09 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-11-21 14:10:09 -0500
commit85b947dced10f5398055af36b5fdb6b8d32a6a6b (patch)
treeefc2f877a6f41869a40b6d0a320e6d5c4fd591ca /src/SMAPI/Framework/ModLoading
parente20d26adcf7276c7f12ab9ab6ea0311953aa5194 (diff)
parenta0cb83ed406fc0447e8edf00e680585005480d23 (diff)
downloadSMAPI-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.cs2
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;