From 5e85e7805e092479482d657360dee2aaa1511050 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Mon, 13 Jan 2025 01:53:03 +0100 Subject: [PATCH] Fix missing names --- RC2BotArchiver/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RC2BotArchiver/Program.cs b/RC2BotArchiver/Program.cs index 6f0967d..8b1cb57 100644 --- a/RC2BotArchiver/Program.cs +++ b/RC2BotArchiver/Program.cs @@ -96,7 +96,7 @@ while (true) if (!responseJson.HasValue) throw new Exception($"Could not get bot {robot.GetProperty("name")} image"); var imageBase64 = responseJson.Value.GetProperty("robotImageData").GetString()!; File.WriteAllBytes(Path.Combine(dirPath, "image.png"), Convert.FromBase64String(imageBase64)); - Console.WriteLine($"Saved {robot.GetProperty("name")}"); + Console.WriteLine($"Saved {robot.GetProperty("name").GetString() ?? ""}"); Thread.Sleep(100); }