explicit null check for JsonSerializer.Deserialize
Some checks are pending
Spell checking / Check Spelling (push) Waiting to run
Spell checking / Report (Push) (push) Blocked by required conditions
Spell checking / Report (PR) (push) Blocked by required conditions
Spell checking / Update PR (push) Waiting to run

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Gleb Khmyznikov 2025-08-21 15:02:41 +02:00 committed by GitHub
parent 0fb833d8b0
commit 48a84502ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -107,7 +107,7 @@ namespace PowerAccent.Core.Tools
try
{
var json = File.ReadAllText(_filePath);
return JsonSerializer.Deserialize(json, SourceGenerationContext.Default.UsageInfoData);
return JsonSerializer.Deserialize(json, SourceGenerationContext.Default.UsageInfoData) ?? new UsageInfoData();
}
catch (Exception ex)
{