Skip to content

Commit b73260f

Browse files
committed
fix crash with null properties from online objects
1 parent f40a3a7 commit b73260f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

AvaGui/Models/ObjectEditorModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ public bool TryLoadObject(FileSystemItem filesystemItem, out UiLocoFile? uiLocoF
209209
}
210210

211211
Logger.Info($"Downloaded object {filesystemItem.Name} with unique id {uniqueObjectId} and added it to the local cache");
212-
Logger.Debug($"{filesystemItem.Name} has authors=[{string.Join(", ", locoObj.Authors.Select(x => x.Name))}], tags=[{string.Join(", ", locoObj.Tags.Select(x => x.Name))}], modpacks=[{string.Join(", ", locoObj.Modpacks.Select(x => x.Name))}], licence={locoObj.Licence}");
213-
OnlineCache.Add(uniqueObjectId, locoObj);
212+
Logger.Debug($"{filesystemItem.Name} has authors=[{string.Join(", ", locoObj?.Authors?.Select(x => x.Name) ?? [])}], tags=[{string.Join(", ", locoObj?.Tags?.Select(x => x.Name) ?? [])}], modpacks=[{string.Join(", ", locoObj?.Modpacks?.Select(x => x.Name) ?? [])}], licence={locoObj?.Licence}");
213+
OnlineCache.Add(uniqueObjectId, locoObj!);
214214
}
215215
else
216216
{

0 commit comments

Comments
 (0)