mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-11 15:22:26 +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) {
|
if(castedSpell) {
|
||||||
char* gmsg = nullptr;
|
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
|
//we don't need spam of bots healing themselves
|
||||||
MakeAnyLenString(&gmsg, "Casting %s on %s.", spells[selectedMercSpell.spellid].name, tar->GetCleanName());
|
MakeAnyLenString(&gmsg, "Casting %s on %s.", spells[selectedMercSpell.spellid].name, tar->GetCleanName());
|
||||||
if(gmsg)
|
if(gmsg)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user