Ambigous call fixed

This bug occured sometime, when we try to call Load() by reflection
without parameters.
This commit is contained in:
Hathor86 2015-11-22 23:43:39 +01:00
parent 3f12ae3485
commit f3771e7b98
1 changed files with 2 additions and 1 deletions

View File

@ -56,7 +56,8 @@ namespace BizHawk.Client.EmuHawk
}
else
{
MethodInfo method = GetType().GetMethod("Load").MakeGenericMethod(toolType);
//The type[] in parameter is used to avoid an ambigous name exception
MethodInfo method = GetType().GetMethod("Load", new Type[] { typeof(bool) }).MakeGenericMethod(toolType);
return (IToolForm)method.Invoke(this, new object[] { focus });
}
}