diff --git a/suite/common/pref/pref-applications-edit.xul b/suite/common/pref/pref-applications-edit.xul index 18e60dc429fb..76a128bf94ba 100644 --- a/suite/common/pref/pref-applications-edit.xul +++ b/suite/common/pref/pref-applications-edit.xul @@ -149,11 +149,12 @@ filePicker.appendFilter(programsFilter, "*.exe; *.com"); else filePicker.appendFilters(FP.filterAll); - filePicker.show(); - var file = filePicker.file.QueryInterface(Components.interfaces.nsILocalFile); - gAppPath.value = file.path; - gAppPath.select(); - selectAppRadio(); + if ( filePicker.show() == FP.returnOK ) { + var file = filePicker.file.QueryInterface(Components.interfaces.nsILocalFile); + gAppPath.value = file.path; + gAppPath.select(); + selectAppRadio(); + } } }