fixed RawContentManager crashing with dynamic assemblies present

This commit is contained in:
Ell 2021-06-20 17:35:56 +02:00
parent a0357e4dfc
commit 07eb6ac36f
1 changed files with 1 additions and 0 deletions

View File

@ -13,6 +13,7 @@ namespace MLEM.Data.Content {
public class RawContentManager : ContentManager, IGameComponent {
private static readonly RawContentReader[] Readers = AppDomain.CurrentDomain.GetAssemblies()
.Where(a => !a.IsDynamic)
.SelectMany(a => a.GetExportedTypes())
.Where(t => t.IsSubclassOf(typeof(RawContentReader)) && !t.IsAbstract)
.Select(t => t.GetConstructor(Type.EmptyTypes).Invoke(null))