Check for Null Event Constant Difference before Clipboard Export (#930)

Prevents ArgumentNullException.
This commit is contained in:
ReignOfComputer 2017-03-09 15:31:22 +08:00 committed by Kaphotics
parent e9ea53ef8c
commit 13aa01ff99

View file

@ -424,6 +424,12 @@ namespace PKHeX.WinForms
Console.Write(e);
}
if (string.IsNullOrEmpty(r))
{
WinFormsUtil.Alert("No Event Constant diff found.");
return;
}
if (DialogResult.Yes != WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Copy Event Constant diff to clipboard?"))
return;
Clipboard.SetText(r);