From 423633a19a89a787c9518e7e764dd9e256aa0a74 Mon Sep 17 00:00:00 2001 From: "Krom, Robertus" Date: Wed, 21 Jun 2017 08:02:14 +0200 Subject: [PATCH] BUG-2227: Fixed an issue where there is no value assigned to the ImgurUploadHistory in the configuration. --- GreenshotImgurPlugin/ImgurPlugin.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/GreenshotImgurPlugin/ImgurPlugin.cs b/GreenshotImgurPlugin/ImgurPlugin.cs index ec1d41b9e..00af89c19 100644 --- a/GreenshotImgurPlugin/ImgurPlugin.cs +++ b/GreenshotImgurPlugin/ImgurPlugin.cs @@ -123,9 +123,14 @@ namespace GreenshotImgurPlugin { } private void UpdateHistoryMenuItem() { - try { + if (_historyMenuItem == null) + { + return; + } + try + { _host.GreenshotForm.BeginInvoke((MethodInvoker)delegate { - if (_config.ImgurUploadHistory.Count > 0) { + if (_config.ImgurUploadHistory != null && _config.ImgurUploadHistory.Count > 0) { _historyMenuItem.Enabled = true; } else { _historyMenuItem.Enabled = false;