diff --git a/mozilla/widget/src/xpwidgets/nsBaseDragService.cpp b/mozilla/widget/src/xpwidgets/nsBaseDragService.cpp index 01f250a42ff..cf4950c0bd7 100644 --- a/mozilla/widget/src/xpwidgets/nsBaseDragService.cpp +++ b/mozilla/widget/src/xpwidgets/nsBaseDragService.cpp @@ -363,6 +363,9 @@ static nsIPresShell* GetPresShellForContent(nsIDOMNode* aDOMNode) { nsCOMPtr content = do_QueryInterface(aDOMNode); + if (!content) + return nsnull; + nsCOMPtr document = content->GetCurrentDoc(); if (document) { document->FlushPendingNotifications(Flush_Display);