ScriptCore: Made creation of class instance safer

This commit is contained in:
Simon Lübeß
2023-12-31 17:05:27 +01:00
parent bd72a67d29
commit ed3884e30e
3 changed files with 34 additions and 20 deletions
+1 -2
View File
@@ -300,8 +300,7 @@ internal class EntityEditor
{
if (ImGui.Selectable(t.Name))
{
object instance = Activator.CreateInstance(t);
newValue = instance;
newValue = ActivatorExtension.CreateInstanceSafe(t);
}
}