fix minor TB when there is no image file in a folder and we browse it

This commit is contained in:
Yann Leboulanger 2006-07-26 09:05:33 +00:00
parent 557489dc5a
commit 134483f936
1 changed files with 2 additions and 0 deletions

View File

@ -2097,6 +2097,8 @@ class ImageChooserDialog(FileChooserDialog):
def on_ok(widget, callback):
'''check if file exists and call callback'''
path_to_file = self.get_filename()
if not path_to_file:
return
path_to_file = gtkgui_helpers.decode_filechooser_file_paths(
(path_to_file,))[0]
if os.path.exists(path_to_file):