Handle file dialog abort properly

This commit is contained in:
mrkubax10 2024-03-03 17:32:27 +01:00
parent d3b2bcce3b
commit dfde12daa6

View File

@ -27,7 +27,7 @@ def menu_file_open_project_click():
title="Open font project",
filetypes=[("Font project (json)", "*.fontproj")]
)
if file_path == "":
if file_path == "" or file_path==():
return
# save last path to cache
@ -58,7 +58,7 @@ def menu_file_save_project_click():
filetypes=[("Font project (json)", "*.fontproj")],
defaultextension=".fontproj"
)
if path=="":
if path=="" or file_path==():
return
try: