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.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/embed/mozilla/FilePicker.cpp b/embed/mozilla/FilePicker.cpp
index 74b3e7bec..7c761e980 100644
--- a/embed/mozilla/FilePicker.cpp
+++ b/embed/mozilla/FilePicker.cpp
@@ -89,11 +89,12 @@ GFilePicker::~GFilePicker()
NS_IMETHODIMP GFilePicker::Init(nsIDOMWindowInternal *parent, const PRUnichar *title, PRInt16 mode)
{
nsCOMPtr<nsIDOMWindow> dw = do_QueryInterface (parent);
- if (!dw) return NS_ERROR_FAILURE;
-
- GtkWidget *pwin = MozillaFindGtkParent (dw);
+ if (dw)
+ {
+ GtkWidget *pwin = MozillaFindGtkParent (dw);
- gtk_window_set_transient_for (GTK_WINDOW (mDialog), GTK_WINDOW (pwin));
+ gtk_window_set_transient_for (GTK_WINDOW (mDialog), GTK_WINDOW (pwin));
+ }
gtk_window_set_title (GTK_WINDOW (mDialog), NS_ConvertUCS2toUTF8 (title).get());