load default config when config exists but is empty

This commit is contained in:
Jonathan Jenne
2019-02-22 11:41:05 +01:00
parent 39c118308d
commit 19bc39c0ce
4 changed files with 16 additions and 2 deletions

View File

@@ -160,6 +160,10 @@ Public Class ConfigManager(Of T)
oConfig = _Serializer.Deserialize(oReader)
End Using
If oConfig Is Nothing Then
oConfig = Activator.CreateInstance(_Blueprint.GetType)
End If
Return oConfig
Catch ex As Exception
_Logger.Error(ex)