diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-12-20 22:35:58 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-12-20 22:35:58 -0500 |
commit | 77002d3e9965d9afa843a95129c6acb5d1c4a283 (patch) | |
tree | b4f4a338945cd3f2cc5881e46fb0dd2b075a79ce /src/SMAPI/Patches/DialogueErrorPatch.cs | |
parent | 1c70736c00e6e70f46f539cb26b5fd253f4eff3b (diff) | |
parent | 5e2f6f565d6ef5330ea2e8c6a5e796f937289255 (diff) | |
download | SMAPI-77002d3e9965d9afa843a95129c6acb5d1c4a283.tar.gz SMAPI-77002d3e9965d9afa843a95129c6acb5d1c4a283.tar.bz2 SMAPI-77002d3e9965d9afa843a95129c6acb5d1c4a283.zip |
Merge branch 'stardew-valley-1.5' into develop
# Conflicts:
# docs/release-notes.md
Diffstat (limited to 'src/SMAPI/Patches/DialogueErrorPatch.cs')
-rw-r--r-- | src/SMAPI/Patches/DialogueErrorPatch.cs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/SMAPI/Patches/DialogueErrorPatch.cs b/src/SMAPI/Patches/DialogueErrorPatch.cs index 42494390..215df561 100644 --- a/src/SMAPI/Patches/DialogueErrorPatch.cs +++ b/src/SMAPI/Patches/DialogueErrorPatch.cs @@ -135,11 +135,9 @@ namespace StardewModdingAPI.Patches IReflectedMethod translateArraysOfStrings = DialogueErrorPatch.Reflection.GetMethod(typeof(Dialogue), "TranslateArraysOfStrings"); IReflectedMethod parseDialogueString = DialogueErrorPatch.Reflection.GetMethod(__instance, "parseDialogueString"); IReflectedMethod checkForSpecialDialogueAttributes = DialogueErrorPatch.Reflection.GetMethod(__instance, "checkForSpecialDialogueAttributes"); - IReflectedField<List<string>> dialogues = DialogueErrorPatch.Reflection.GetField<List<string>>(__instance, "dialogues"); // replicate base constructor - if (dialogues.GetValue() == null) - dialogues.SetValue(new List<string>()); + __instance.dialogues ??= new List<string>(); // duplicate code with try..catch try |