Drakulix / ScrollsModLoader

A Mod Loader Framework for the game "Scrolls" by Mojang
www.scrollsguide.com/summoner
GNU Lesser General Public License v2.1
15 stars 9 forks source link

Fails without meaningful message when constructor is not public #6

Closed MaPePeR closed 11 years ago

MaPePeR commented 11 years ago

https://github.com/Drakulix/ScrollsModLoader/blob/master/Core/ModLoader.cs#L429

Fails with a NullReferenceException because GetConstructor returns null when no public constructor is found.

Maybe use GetConstructors(BindingFlags.NonPublic | BindingFlags.Public) and check if only 1 Constructor is given.