Fix a crash due to null pointer immediately after updating

This commit is contained in:
Zontreck 2020-06-29 01:48:30 -07:00
parent 36e8562feb
commit 6ead57da24
2 changed files with 8 additions and 8 deletions

View file

@ -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)