From 552d836623c304f83cab65853757e2bb24982e3d Mon Sep 17 00:00:00 2001 From: wcko87 Date: Fri, 12 May 2017 21:17:50 +0800 Subject: [PATCH] Fix NullReferenceException. Damn how did I miss that before --- rabi_splitter_WPF/VariableExportConfig.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/rabi_splitter_WPF/VariableExportConfig.cs b/rabi_splitter_WPF/VariableExportConfig.cs index fc1456f..aacb8cd 100644 --- a/rabi_splitter_WPF/VariableExportConfig.cs +++ b/rabi_splitter_WPF/VariableExportConfig.cs @@ -107,19 +107,19 @@ namespace rabi_splitter_WPF ExportVariable ( handle: "nextHammerExp", displayName: "Next Hammer Level Exp", - tracker: () => snapshot == null ? 0 : snapshot.nextHammer.Item1 + tracker: () => snapshot?.nextHammer == null ? 0 : snapshot.nextHammer.Item1 ), ExportVariable ( handle: "nextHammerName", displayName: "Next Hammer Level Name (Short)", - tracker: () => snapshot == null ? "" : snapshot.nextHammer.Item2 + tracker: () => snapshot?.nextHammer == null ? "" : snapshot.nextHammer.Item2 ), ExportVariable ( handle: "nextHammerNameLong", displayName: "Next Hammer Level Name (Long)", - tracker: () => snapshot == null ? "" : snapshot.nextHammer.Item3 + tracker: () => snapshot?.nextHammer == null ? "" : snapshot.nextHammer.Item3 ), ExportVariable ( @@ -131,19 +131,19 @@ namespace rabi_splitter_WPF ExportVariable ( handle: "nextRibbonExp", displayName: "Next Ribbon Level Exp", - tracker: () => snapshot == null ? 0 : snapshot.nextRibbon.Item1 + tracker: () => snapshot?.nextRibbon == null ? 0 : snapshot.nextRibbon.Item1 ), ExportVariable ( handle: "nextRibbonName", displayName: "Next Ribbon Level Name (Short)", - tracker: () => snapshot == null ? "" : snapshot.nextRibbon.Item2 + tracker: () => snapshot?.nextRibbon == null ? "" : snapshot.nextRibbon.Item2 ), ExportVariable ( handle: "nextRibbonNameLong", displayName: "Next Ribbon Level Name (Long)", - tracker: () => snapshot == null ? "" : snapshot.nextRibbon.Item3 + tracker: () => snapshot?.nextRibbon == null ? "" : snapshot.nextRibbon.Item3 ), ExportVariable ( @@ -155,19 +155,19 @@ namespace rabi_splitter_WPF ExportVariable ( handle: "nextCarrotExp", displayName: "Next Carrot Level Exp", - tracker: () => snapshot == null ? 0 : snapshot.nextCarrot.Item1 + tracker: () => snapshot?.nextCarrot == null ? 0 : snapshot.nextCarrot.Item1 ), ExportVariable ( handle: "nextCarrotName", displayName: "Next Carrot Level Name (Short)", - tracker: () => snapshot == null ? "" : snapshot.nextCarrot.Item2 + tracker: () => snapshot?.nextCarrot == null ? "" : snapshot.nextCarrot.Item2 ), ExportVariable ( handle: "nextCarrotNameLong", displayName: "Next Carrot Level Name (Long)", - tracker: () => snapshot == null ? "" : snapshot.nextCarrot.Item3 + tracker: () => snapshot?.nextCarrot == null ? "" : snapshot.nextCarrot.Item3 ), ExportVariable (