Bladeren bron

fix two crashes

Emagi 6 maanden geleden
bovenliggende
commit
e5c3ffca13
2 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 1 1
      EQ2/source/WorldServer/Items/Items.cpp
  2. 1 1
      EQ2/source/WorldServer/LuaFunctions.cpp

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

@@ -3575,7 +3575,7 @@ EQ2Packet* PlayerItemList::serialize(Player* player, int16 version){
 			if(item && item->details.new_item)
 				new_index++;
 			
-			if(firstRun && i > 19) {
+			if(item && firstRun && i > 19) {
 				item->details.new_item = true;
 				continue;
 			}

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

@@ -2566,7 +2566,7 @@ int EQ2Emu_lua_RemoveSpellBonus(lua_State* state) {
 		ZoneServer* zone = nullptr;
 		if (luaspell->caster != nullptr)
 			zone = luaspell->caster->GetZone();
-		if(!zone) {
+		if(!zone && spawn) {
 			zone = spawn->GetZone(); // workaround to try to establish a zone to find the targets and remove the spells
 		}
 		Spawn* target = 0;