Преглед изворни кода

Fixed missing License Data on new Database

Frank van den Bos пре 2 година
родитељ
комит
45898806c3
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      InABox.Database/DbFactory.cs

+ 2 - 0
InABox.Database/DbFactory.cs

@@ -243,6 +243,8 @@ namespace InABox.Database
                 var newLicense = LicenseUtils.GenerateNewLicense();
                 if (LicenseUtils.TryEncryptLicense(newLicense, out var newData, out var error))
                 {
+                    if (license == null)
+                        license = new License();
                     license.Data = newData;
                     Provider.Save(license);
                 }