Fixes random NPEs (#378)

This commit is contained in:
Kamron Batman 2021-01-01 02:16:23 -08:00 • committed by GitHub
parent 582e1877b8
commit cc91fe2b10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 14 deletions

View file

@ -289,7 +289,11 @@ namespace Server.Spells.Fourth
while (m_Queue.Count > 0)
{
var m = (Mobile)m_Queue.Dequeue();
var m = m_Queue.Dequeue() as Mobile;
if (m == null)
{
continue;
}
if (SpellHelper.CanRevealCaster(m))
{