Browse Source

Merge remote-tracking branch 'origin/frank' into kenric

Kenric Nugteren 2 years ago
parent
commit
80c60e771e
1 changed files with 2 additions and 0 deletions
  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);
                 }