From 8af1b0c22a9c449746479b8a82494e43d60af573 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Sun, 22 Apr 2018 21:00:39 +0200 Subject: Bug 1329570 - Restore missing error check in mozilla::dom::Location::GetPathname native in moebius --- dom/base/Location.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'dom') diff --git a/dom/base/Location.cpp b/dom/base/Location.cpp index e3b614931..b17e733d5 100644 --- a/dom/base/Location.cpp +++ b/dom/base/Location.cpp @@ -577,9 +577,10 @@ Location::GetPathname(nsAString& aPathname) aPathname.Truncate(); nsCOMPtr uri; - nsresult result = NS_OK; - - result = GetURI(getter_AddRefs(uri)); + nsresult result = GetURI(getter_AddRefs(uri)); + if (NS_FAILED(result) || !uri) { + return result; + } nsCOMPtr url(do_QueryInterface(uri)); if (url) { -- cgit v1.2.3