Debugger: Text Hooker - Fixed crash when auto-copy to clipboard is enabled while screen doesn't contain any text

This commit is contained in:
Sour 2018-07-16 18:35:15 -04:00
parent 26b94f18cd
commit 28aeacef9f

View file

@ -155,7 +155,7 @@ namespace Mesen.GUI.Debugger.Controls
} }
txtSelectedText.Text = output.ToString(); txtSelectedText.Text = output.ToString();
if(chkAutoCopyToClipboard.Checked) { if(chkAutoCopyToClipboard.Checked && !string.IsNullOrWhiteSpace(txtSelectedText.Text)) {
Clipboard.SetText(txtSelectedText.Text); Clipboard.SetText(txtSelectedText.Text);
} }
} }