From a37dc9946e98211e1b35dd97afe13cc955591877 Mon Sep 17 00:00:00 2001 From: Little Cat Date: Thu, 12 Jan 2023 21:39:35 -0400 Subject: [PATCH] hood: Fix crash when skipping Tutorial. Fixes #66 --- toontown/hood/QuietZoneState.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/toontown/hood/QuietZoneState.py b/toontown/hood/QuietZoneState.py index bb22453..6dd1f3a 100644 --- a/toontown/hood/QuietZoneState.py +++ b/toontown/hood/QuietZoneState.py @@ -264,10 +264,11 @@ class QuietZoneState(StateData.StateData): self.fsm.request('waitForSetZoneResponse') def gotZoneRedirect(self, zoneId): - self.notify.info('Redirecting to zone %s.' % zoneId) - base.cr.handlerArgs['zoneId'] = zoneId - base.cr.handlerArgs['hoodId'] = ZoneUtil.getHoodId(zoneId) - self.fsm.request('waitForSetZoneResponse') + if hasattr(self, 'fsm'): + self.notify.info('Redirecting to zone %s.' % zoneId) + base.cr.handlerArgs['zoneId'] = zoneId + base.cr.handlerArgs['hoodId'] = ZoneUtil.getHoodId(zoneId) + self.fsm.request('waitForSetZoneResponse') def exitWaitForZoneRedirect(self): self.notify.debug('exitWaitForZoneRedirect()')