mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 23:01:30 +00:00
Some quick additions of sanity checks for pointers and variables
This commit is contained in:
parent
a7bcc12eb6
commit
f012d13f0c
@ -109,7 +109,7 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u
|
|||||||
glm::vec2(8, 8), glm::vec2(-8, 8), glm::vec2(8, -8), glm::vec2(-8, -8)
|
glm::vec2(8, 8), glm::vec2(-8, 8), glm::vec2(8, -8), glm::vec2(-8, -8)
|
||||||
};
|
};
|
||||||
|
|
||||||
NPC* swarm_pet_npc;
|
NPC* swarm_pet_npc = nullptr;
|
||||||
|
|
||||||
while (summon_count > 0) {
|
while (summon_count > 0) {
|
||||||
int pet_duration = pet.duration;
|
int pet_duration = pet.duration;
|
||||||
@ -164,7 +164,7 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u
|
|||||||
summon_count--;
|
summon_count--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsClient() && eye_id != nullptr) {
|
if (swarm_pet_npc && IsClient() && eye_id != nullptr) {
|
||||||
*eye_id = swarm_pet_npc->GetID();
|
*eye_id = swarm_pet_npc->GetID();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4365,7 +4365,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) {
|
|||||||
/* Boat handling */
|
/* Boat handling */
|
||||||
if (ppu->spawn_id != GetID()) {
|
if (ppu->spawn_id != GetID()) {
|
||||||
/* If player is controlling boat */
|
/* If player is controlling boat */
|
||||||
if (ppu->spawn_id == controlling_boat_id) {
|
if (ppu->spawn_id && ppu->spawn_id == controlling_boat_id) {
|
||||||
Mob *boat = entity_list.GetMob(controlling_boat_id);
|
Mob *boat = entity_list.GetMob(controlling_boat_id);
|
||||||
if (boat == 0) {
|
if (boat == 0) {
|
||||||
controlling_boat_id = 0;
|
controlling_boat_id = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user