From b6e1e3e3f4a5e189d68dc66fec655e7272132b6c Mon Sep 17 00:00:00 2001 From: Kenneth Hsu Date: Sat, 6 Oct 2018 20:41:59 -0700 Subject: [PATCH] Avoid potential null reference exception. --- Duplicati/GUI/Duplicati.GUI.TrayIcon/RumpsRunner.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Duplicati/GUI/Duplicati.GUI.TrayIcon/RumpsRunner.cs b/Duplicati/GUI/Duplicati.GUI.TrayIcon/RumpsRunner.cs index 855e70cd1..1fa1c373e 100644 --- a/Duplicati/GUI/Duplicati.GUI.TrayIcon/RumpsRunner.cs +++ b/Duplicati/GUI/Duplicati.GUI.TrayIcon/RumpsRunner.cs @@ -333,9 +333,9 @@ namespace Duplicati.GUI.TrayIcon m_isQuitting = true; if (m_rumpsProcess != null && !m_rumpsProcess.HasExited) { - m_toRumps.WriteNoWait(JsonConvert.SerializeObject(new {Action = "shutdown"})); if (m_toRumps != null) - { + { + m_toRumps.WriteNoWait(JsonConvert.SerializeObject(new { Action = "shutdown" })); m_toRumps.Dispose(); m_toRumps = null; }