You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Gui/ViewModels/SubObjectTypes/ImageTableViewModel.cs
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -223,11 +223,12 @@ public async Task ImportImages()
223
223
{
224
224
// found blender folder
225
225
varoffsets=JsonSerializer.Deserialize<ICollection<SpriteOffset>>(File.ReadAllText(offsetsFile));// sprites.json is an unnamed array so we need ICollection here, not IEnumerable
226
+
ArgumentNullException.ThrowIfNull(offsets);
226
227
Logger.Debug("Found sprites.json file, using that");
227
228
228
-
if(offsets?.Count!=G1Provider.G1Elements.Count)
229
+
if(offsets.Count!=G1Provider.G1Elements.Count)
229
230
{
230
-
Logger.Warning($"Expected {G1Provider.G1Elements.Count} offsets, got {offsets?.Count} offsets. Continue at your peril.");
231
+
Logger.Warning($"Expected {G1Provider.G1Elements.Count} offsets, got {offsets.Count} offsets. Continue at your peril.");
0 commit comments