diff --git a/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs b/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs index 63f976f107..c853b50d05 100644 --- a/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs +++ b/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs @@ -41,13 +41,16 @@ namespace OpenGrid.Framework.Data.DB4o public DataResponse AddProfile(SimProfileData profile) { - if (manager.AddRow(profile)) + lock (manager.profiles) { - return DataResponse.RESPONSE_OK; - } - else - { - return DataResponse.RESPONSE_ERROR; + if (manager.AddRow(profile)) + { + return DataResponse.RESPONSE_OK; + } + else + { + return DataResponse.RESPONSE_ERROR; + } } }