fix segmentation fault

This commit is contained in:
Will McGugan
2022-08-17 10:06:25 +01:00
parent d7656abb82
commit 11191b2109
3 changed files with 4 additions and 3 deletions

View File

@@ -1071,8 +1071,8 @@ class App(Generic[ReturnType], DOMNode):
async def shutdown(self):
await self._disconnect_devtools()
driver = self._driver
assert driver is not None
driver.disable_input()
if driver is not None:
driver.disable_input()
await self.close_messages()
def refresh(self, *, repaint: bool = True, layout: bool = False) -> None:

View File

@@ -37,7 +37,6 @@ from .geometry import Offset, Region, Size, Spacing, clamp
from .layouts.vertical import VerticalLayout
from .message import Message
from .reactive import Reactive, watch
from .renderables.align import Align
if TYPE_CHECKING:

View File

@@ -77,3 +77,5 @@ async def test_screens():
# Check we can't pop last screen
with pytest.raises(ScreenStackError):
app.pop_screen()
await app.shutdown()