diff --git a/embedding/browser/gtk/src/GtkPromptService.cpp b/embedding/browser/gtk/src/GtkPromptService.cpp index bb0480777ad..a7260b4d3a5 100644 --- a/embedding/browser/gtk/src/GtkPromptService.cpp +++ b/embedding/browser/gtk/src/GtkPromptService.cpp @@ -285,6 +285,10 @@ GtkPromptService::GetGtkWindowForDOMWindow(nsIDOMWindow* aDOMWindow) nsCOMPtr chrome; wwatch->GetChromeForWindow(aDOMWindow, getter_AddRefs(chrome)); nsCOMPtr siteWindow = do_QueryInterface(chrome); + + if (!siteWindow) + return NULL; + GtkWidget* parentWidget; siteWindow->GetSiteWindow((void**)&parentWidget);