Fix cast member crash

This commit is contained in:
John 2015-08-13 14:03:08 +03:00
parent 0976a80bef
commit 1d1e96d055

View file

@ -526,9 +526,15 @@ class ToonAvatarPanel(AvatarPanelBase.AvatarPanelBase):
def __handleCastDialog(self): def __handleCastDialog(self):
self.cleanupDialog() self.cleanupDialog()
base.cr.playGame.getPlace().setState('stopped') base.cr.playGame.getPlace().setState('stopped')
self.dialog = TTDialog.TTDialog(style=TTDialog.Acknowledge, text=TTLocalizer.AvatarPanelCastInfo % self.avatar.getName(), text_wordwrap=20, command=self.cleanupDialogAndWalk) self.dialog = TTDialog.TTDialog(style=TTDialog.Acknowledge, text=TTLocalizer.AvatarPanelCastInfo % self.avatar.getName(), text_wordwrap=20, command=self.__cleanupDialogAndWalk)
self.dialog.show() self.dialog.show()
def __cleanupDialogAndWalk(self, extra=None):
if self.dialog:
self.dialog.destroy()
self.dialog = None
base.cr.playGame.getPlace().fsm.request('walk')
def __makeBoardingGui(self): def __makeBoardingGui(self):
self.confirmKickOutDialog = None self.confirmKickOutDialog = None
groupAvatarBgGui = loader.loadModel('phase_3.5/models/gui/tt_m_gui_brd_avatarPanelBg') groupAvatarBgGui = loader.loadModel('phase_3.5/models/gui/tt_m_gui_brd_avatarPanelBg')