BUG-2542: Fix for shutdown issue (ImgurPlugin)

This commit is contained in:
Krom, Robertus 2020-02-11 12:59:49 +01:00
parent 2386ea15aa
commit 3c965a6c3e

View file

@ -129,11 +129,17 @@ namespace GreenshotImgurPlugin {
} }
try try
{ {
_host.GreenshotForm.BeginInvoke((MethodInvoker)delegate { _host.GreenshotForm.BeginInvoke((MethodInvoker)delegate
if (_config.ImgurUploadHistory != null && _config.ImgurUploadHistory.Count > 0) { {
_historyMenuItem.Enabled = true; var historyMenuItem = _historyMenuItem;
if (historyMenuItem == null)
{
return;
}
if (_config?.ImgurUploadHistory != null && _config.ImgurUploadHistory.Count > 0) {
historyMenuItem.Enabled = true;
} else { } else {
_historyMenuItem.Enabled = false; historyMenuItem.Enabled = false;
} }
}); });
} catch (Exception ex) { } catch (Exception ex) {