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,9 +542,11 @@ int main(int argc, char** argv) {
process_timer.Stop(); process_timer.Stop();
process_timer.Start(1000, true); process_timer.Start(1000, true);
if (zone && zone->GetZoneID() && zone->GetInstanceVersion()) {
uint32 shutdown_timer = database.getZoneShutDownDelay(zone->GetZoneID(), zone->GetInstanceVersion()); uint32 shutdown_timer = database.getZoneShutDownDelay(zone->GetZoneID(), zone->GetInstanceVersion());
zone->StartShutdownTimer(shutdown_timer); zone->StartShutdownTimer(shutdown_timer);
} }
}
else if (!previous_loaded && current_loaded) { else if (!previous_loaded && current_loaded) {
process_timer.Stop(); process_timer.Stop();
process_timer.Start(32, true); process_timer.Start(32, true);