Merge pull request #2038 from PySimpleGUI/Dev-latest

Fix for crash in PopupGetFile if clicking cancel with no_window set t…
This commit is contained in:
PySimpleGUI 2019-09-30 21:13:01 -04:00 committed by GitHub
commit 950b04241b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,5 @@
#!/usr/bin/python3
version = __version__ = "4.5.0.21 Unreleased Mac Buttons. Element size get/set. Screen Size. hide/unhide row. Button rebinding"
version = __version__ = "4.5.0.22 Unreleased Mac Buttons. Element size get/set. Screen Size. hide/unhide row. Button rebinding"
# 888888ba .d88888b oo dP .88888. dP dP dP
@ -10688,7 +10688,8 @@ def PopupGetFile(message, title=None, default_path='', default_extension='', sav
Window.hidden_master_root.destroy()
Window.hidden_master_root = None
if not multiple_files and type(filename) in (tuple, list):
filename = filename[0]
if len(filename): # only if not 0 length, otherwise will get an error
filename = filename[0]
return filename
if save_as: