mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-29 01:31:30 +00:00
Added safety check to [tar] dereference
This commit is contained in:
parent
cd7584f512
commit
397619e2f9
@ -2156,7 +2156,7 @@ bool Merc::AICastSpell(int8 iChance, uint32 iSpellTypes) {
|
||||
if(castedSpell) {
|
||||
char* gmsg = nullptr;
|
||||
|
||||
if(tar != this) {
|
||||
if(tar && tar != this) { // [tar] was implicitly valid at this point..this change is to catch any bad logic
|
||||
//we don't need spam of bots healing themselves
|
||||
MakeAnyLenString(&gmsg, "Casting %s on %s.", spells[selectedMercSpell.spellid].name, tar->GetCleanName());
|
||||
if(gmsg)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user