Fixed crash when Window2 is closed.

This commit is contained in:
PySimpleGUI 2020-08-07 06:48:14 -04:00
parent d0e5505c25
commit 9f1d609bd6
1 changed files with 4 additions and 2 deletions

View File

@ -3,11 +3,12 @@ import PySimpleGUI as sg
"""
Multiple Window Design Pattern
Two windows - both remain active
Two windows - both remain active and visible
Window 1 launches Window 2
Window 1 remains visible and active while Window 2 is active
Closing Window 1 exits application
Copyright 2020 PySimpleGUI.org
"""
@ -45,6 +46,7 @@ def main():
window2 = None
window1.close()
if window2 is not None:
window2.close()