Loading...   


diff --git a/zone/hate_list.cpp b/zone/hate_list.cpp
index 2d7bd3e..31a6dbf 100644
--- a/zone/hate_list.cpp
+++ b/zone/hate_list.cpp
@@ -163,7 +163,7 @@ Mob* HateList::GetClosest(Mob *hater) {
 		++iterator;
 	}
 
-	if (close == 0 && hater->IsNPC() || close->DivineAura())
+	if (!close && hater->IsNPC() || (close && close->DivineAura()))
 		close = hater->CastToNPC()->GetHateTop();
 
 	return close;
@@ -303,7 +303,7 @@ Mob *HateList::GetTop(Mob *center)
 				continue;
 			}
 
-			if(center->IsNPC() && center->CastToNPC()->IsUnderwaterOnly() && zone->HasWaterMap()) {
+			if(center->IsNPC() && center->CastToNPC()->IsUnderwaterOnly() && (zone && zone->HasWaterMap()) {
 				if(!zone->watermap->InLiquid(cur->ent->GetX(), cur->ent->GetY(), cur->ent->GetZ())) {
 					skipped_count++;
 					++iterator;

Raw Paste Data