From 6ead57da2488f49ee6ba7f626626a451e494d2a6 Mon Sep 17 00:00:00 2001 From: Zontreck Date: Mon, 29 Jun 2020 01:48:30 -0700 Subject: [PATCH] Fix a crash due to null pointer immediately after updating --- Assembly/ASMInfo.cs | 4 ++-- Program.cs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Assembly/ASMInfo.cs b/Assembly/ASMInfo.cs index d6695ac..ca24235 100644 --- a/Assembly/ASMInfo.cs +++ b/Assembly/ASMInfo.cs @@ -6,7 +6,7 @@ using System.Reflection; [assembly: AssemblyCompany("ZNI")] [assembly: AssemblyAlgorithmId(System.Configuration.Assemblies.AssemblyHashAlgorithm.MD5)] [assembly: AssemblyCopyright("© 2020 Tara Piccari")] -[assembly: AssemblyFileVersion("5.3.913")] +[assembly: AssemblyFileVersion("5.3.914")] [assembly: AssemblyDescription("Second Life Bot - BotCore5")] @@ -15,7 +15,7 @@ namespace Bot.Assemble public class ASMInfo { public static string BotName = "ZBotCore"; - public static string BotVer = "5.3.913"; + public static string BotVer = "5.3.914"; public static string GitPassword { get diff --git a/Program.cs b/Program.cs index ad03dec..390346d 100644 --- a/Program.cs +++ b/Program.cs @@ -244,12 +244,6 @@ namespace Bot } if (LoggedIn) { - if (File.Exists("XUP")) - { - File.Delete("XUP"); - - MessageFactory.Post(Destinations.DEST_LOCAL, $"Updated to version {BotStr} - {BotVer}", UUID.Zero); - } // Setup BotSession Singleton! @@ -398,6 +392,12 @@ namespace Bot IntPtr addr = (IntPtr)ptr; MessageFactory.Post(Destinations.DEST_LOCAL, "Generic Exception Caught: " + Msg + " [0x0A, 0x" + addr.ToString("x") + "]\nSTACK: " + STACK, UUID.Zero); } + if (File.Exists("XUP")) + { + File.Delete("XUP"); + + MessageFactory.Post(Destinations.DEST_LOCAL, $"Updated to version {BotStr} - {BotVer}", UUID.Zero); + } } foreach (IProgram plugin in g_ZPrograms)