From d90457b6e3221ea50e408b40fca45ab428c0e5d9 Mon Sep 17 00:00:00 2001 From: Serraniel Date: Wed, 30 Jan 2019 20:54:07 +0100 Subject: [PATCH] #20 Only continue after login dialog if "ok" is the dialog result. --- Discord Media Loader.Application/Classes/Core.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Discord Media Loader.Application/Classes/Core.cs b/Discord Media Loader.Application/Classes/Core.cs index f570af6..477643e 100644 --- a/Discord Media Loader.Application/Classes/Core.cs +++ b/Discord Media Loader.Application/Classes/Core.cs @@ -193,7 +193,7 @@ namespace DML.Application.Classes } } - catch (HttpException e) + catch (HttpException) { Logger.Warn("HTTPException occured during login. Probably from login token."); } @@ -202,7 +202,10 @@ namespace DML.Application.Classes { Logger.Debug("Showing dialog for username and password..."); var loginDlg = new LoginDialog(); - loginDlg.ShowDialog(); + if (loginDlg.ShowDialog() != DialogResult.OK) + { + return; + } } }