fix: Fixes mount block NPE (#1257)

This commit is contained in:
Voxpire 2022-11-21 15:11:02 +00:00 committed by GitHub
parent 4c734a23b9
commit 139be1bc23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1091,7 +1091,7 @@ namespace Server.Mobiles
}
}
if (!_mountBlock.CheckBlock() || _mountBlock.Expiration < Core.Now + duration)
if (_mountBlock == null || !_mountBlock.CheckBlock() || _mountBlock.Expiration < Core.Now + duration)
{
_mountBlock?.RemoveBlock(this);
_mountBlock = new MountBlock(duration, type, this);