showbase: Fix exception when calling Ctrl+C at the wrong moment

This commit is contained in:
rdb 2026-01-26 11:10:27 +01:00
parent 8cd3812ecb
commit d84b984e22
1 changed files with 2 additions and 1 deletions

View File

@ -711,7 +711,8 @@ class ShowBase(DirectObject.DirectObject):
allowAccessibilityShortcutKeys(True)
self.__disabledStickyKeys = False
self.__directObject.ignoreAll()
if hasattr(self, '__directObject'):
self.__directObject.ignoreAll()
self.ignoreAll()
self.shutdown()