mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 12:18:27 +00:00
[Crash] Add Checks for valid pointers or fix existing. (#3164)
This commit is contained in:
+2
-4
@@ -209,8 +209,7 @@ void Trap::Trigger(Mob* trigger)
|
||||
{
|
||||
entity_list.MessageClose(trigger,false,100,13,"%s",message.c_str());
|
||||
}
|
||||
if(trigger->IsClient())
|
||||
{
|
||||
if (trigger && trigger->IsClient()) {
|
||||
auto outapp = new EQApplicationPacket(OP_Damage, sizeof(CombatDamage_Struct));
|
||||
CombatDamage_Struct* a = (CombatDamage_Struct*)outapp->pBuffer;
|
||||
int64 dmg = zone->random.Int(effectvalue, effectvalue2);
|
||||
@@ -226,8 +225,7 @@ void Trap::Trigger(Mob* trigger)
|
||||
}
|
||||
}
|
||||
|
||||
if (trigger && trigger->IsClient())
|
||||
{
|
||||
if (trigger && trigger->IsClient()) {
|
||||
trigger->CastToClient()->trapid = trap_id;
|
||||
charid = trigger->CastToClient()->CharacterID();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user