aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/FilePicker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/FilePicker.cpp')
-rw-r--r--embed/mozilla/FilePicker.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/embed/mozilla/FilePicker.cpp b/embed/mozilla/FilePicker.cpp
index 4dd0340b8..71685c958 100644
--- a/embed/mozilla/FilePicker.cpp
+++ b/embed/mozilla/FilePicker.cpp
@@ -297,7 +297,8 @@ NS_IMETHODIMP GFilePicker::GetFileURL(nsIFileURL **aFileURL)
{
nsCOMPtr<nsILocalFile> file;
GetFile (getter_AddRefs(file));
-
+ NS_ENSURE_TRUE (file, NS_ERROR_FAILURE);
+
nsCOMPtr<nsIFileURL> fileURL = do_CreateInstance (NS_STANDARDURL_CONTRACTID);
fileURL->SetFile(file);
NS_IF_ADDREF(*aFileURL = fileURL);