Temporarily fix crash on shutdown

Related to https://www.getmangos.eu/issue.php?issueid=443#note1174