Fix UI crash on Unix when loading External Tools submenu

This commit is contained in:
YoshiRulz 2020-01-17 06:29:09 +10:00
parent 692eb5ea89
commit 49c7acb3aa
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@ using System.Reflection;
using System.Windows.Forms;
using BizHawk.Client.Common;
using BizHawk.Common;
namespace BizHawk.Client.ApiHawk
{
@ -85,7 +86,7 @@ namespace BizHawk.Client.ApiHawk
try
{
BizHawk.Common.MotWHack.RemoveMOTW(fileName);
if (!OSTailoredCode.IsUnixHost) MotWHack.RemoveMOTW(fileName);
var externalToolFile = Assembly.LoadFrom(fileName);
object[] attributes = externalToolFile.GetCustomAttributes(typeof(BizHawkExternalToolAttribute), false);
if (attributes != null && attributes.Count() == 1)