mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fix nullable error
This commit is contained in:
parent
0830480821
commit
c8120adf8b
@ -78,7 +78,10 @@ namespace Wabbajack.Common
|
||||
using var tr = new StreamReader(stream, Encoding.UTF8, leaveOpen: true);
|
||||
using var reader = new JsonTextReader(tr);
|
||||
var ser = JsonSerializer.Create(JsonSettings);
|
||||
return ser.Deserialize<T>(reader);
|
||||
var result = ser.Deserialize<T>(reader);
|
||||
if (result == null)
|
||||
throw new JsonException("Type deserialized into null");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user