From d3d0ed7378b9dfc179d0a43cf607a5703d87ce2a Mon Sep 17 00:00:00 2001 From: Railz Date: Mon, 30 Sep 2019 14:55:04 +0200 Subject: [PATCH] Fixed stackOverFlow when 2 classes depend on each other --- Database-Attribute_System/ClassAction.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Database-Attribute_System/ClassAction.cs b/Database-Attribute_System/ClassAction.cs index cdb3e3f..01f6338 100644 --- a/Database-Attribute_System/ClassAction.cs +++ b/Database-Attribute_System/ClassAction.cs @@ -27,8 +27,8 @@ namespace eu.railduction.netcore.dll.Database_Attribute_System // Check if given class is marked as dbObject if (!(classType.GetCustomAttribute(typeof(DbObject), true) is DbObject dbObject)) throw new InvalidOperationException($"Cannot init '{classType.Name}'. Missing Attribute 'DbObject'"); - dbObject.Init(classType); // Init dbObject initiatedClassTypes.Add(classType, dbObject); // Set it to the list + dbObject.Init(classType); // Init dbObject cachedDbObject = dbObject; }