fix: Adds more null checks for text definition to prevent NPEs (#936)

This commit is contained in:
Kamron Batman 2022-02-18 11:13:38 -08:00 • committed by GitHub
parent 04909828c8
commit 2009ac6892
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 82 additions and 61 deletions

View file

@ -286,7 +286,7 @@ namespace Server.Items
public override void BeginConfirmation(Mobile from)
{
if (GumpWidth > 0 && GumpHeight > 0 && TitleNumber > 0 && !Message.IsEmpty)
if (GumpWidth > 0 && GumpHeight > 0 && TitleNumber > 0 && Message?.IsEmpty == false)
{
from.CloseGump<WarningGump>();
from.SendGump(