Skip to content

Commit

Permalink
Update per blizzy78/ksp_toolbar#39 to resolve NotSupportedException
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerbas-ad-astra committed Oct 20, 2016
1 parent 8a35895 commit 87e14f8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions AGExt/Button.cs
Original file line number Diff line number Diff line change
Expand Up @@ -828,9 +828,15 @@ internal ToolbarTypes()

internal static Type getType(string name)
{
return AssemblyLoader.loadedAssemblies
.SelectMany(a => a.assembly.GetExportedTypes())
.SingleOrDefault(t => t.FullName == name);
Type type = null;
AssemblyLoader.loadedAssemblies.TypeOperation(t =>
{
if (t.FullName == name)
{
type = t;
}
});
return type;
}

internal static PropertyInfo getProperty(Type type, string name)
Expand Down

0 comments on commit 87e14f8

Please sign in to comment.