Pārlūkot izejas kodu

Additional misc ptr crash fixes

Emagi 8 mēneši atpakaļ
vecāks
revīzija
11032419f3

+ 1 - 1
EQ2/source/WorldServer/Spawn.cpp

@@ -3743,7 +3743,7 @@ void Spawn::CheckEncounterState(Entity* victim, bool test_auto_lock) {
 
 					for (int8 i = 0; i < members->size(); i++) {
 						Entity* member = members->at(i)->member;
-						if (member->GetZone() != attacker->GetZone())
+						if (!member || member->GetZone() != attacker->GetZone())
 							continue;
 
 						if (member->IsEntity()) {

+ 1 - 1
EQ2/source/WorldServer/client.cpp

@@ -4921,7 +4921,7 @@ void Client::HandleVerbRequest(EQApplicationPacket* app) {
 							delete_commands.push_back(player->CreateEntityCommand("kick from group", 10000, "kickfromgroup", "", 0, 0));
 							delete_commands.push_back(player->CreateEntityCommand("make group leader", 10000, "makeleader", "", 0, 0));
 						}
-						if(spawn->IsPlayer() && !player->GetGroupMemberInfo()->mentor_target_char_id)
+						if(spawn->IsPlayer() && player->GetGroupMemberInfo() && !player->GetGroupMemberInfo()->mentor_target_char_id)
 							delete_commands.push_back(player->CreateEntityCommand("Mentor", 10000, "mentor", "", 0, 0));
 						else if(spawn->IsPlayer() && player->GetGroupMemberInfo()->mentor_target_char_id == ((Player*)spawn)->GetCharacterID())
 							delete_commands.push_back(player->CreateEntityCommand("Stop Mentoring", 10000, "unmentor", "", 0, 0));