Zone: Main loop crash fix

This commit is contained in:
Akkadius 2017-10-16 13:20:33 -05:00
parent a7d0251b77
commit e80f3c87e9

View File

@ -542,8 +542,10 @@ int main(int argc, char** argv) {
process_timer.Stop();
process_timer.Start(1000, true);
uint32 shutdown_timer = database.getZoneShutDownDelay(zone->GetZoneID(), zone->GetInstanceVersion());
zone->StartShutdownTimer(shutdown_timer);
if (zone && zone->GetZoneID() && zone->GetInstanceVersion()) {
uint32 shutdown_timer = database.getZoneShutDownDelay(zone->GetZoneID(), zone->GetInstanceVersion());
zone->StartShutdownTimer(shutdown_timer);
}
}
else if (!previous_loaded && current_loaded) {
process_timer.Stop();