Bug 1359369 - prevent null pointer dereference in NS_GetIsDocumentChannel. r=valentin

MozReview-Commit-ID: I1iu2miXmjZ

--HG--
extra : rebase_source : ea86f96806ae0536cb799e28c286e92d4c3b4717
This commit is contained in:
Andi-Bogdan Postelnicu 2017-04-25 14:38:03 +03:00
parent 021f1ff90a
commit d5f08cd7a3

View File

@ -366,10 +366,10 @@ NS_GetIsDocumentChannel(nsIChannel * aChannel, bool *aIsDocument)
// LOAD_HTML_OBJECT_DATA is set it may or may not be used to create a
// document, depending on its MIME type.
*aIsDocument = false;
if (!aChannel || !aIsDocument) {
return NS_ERROR_NULL_POINTER;
}
*aIsDocument = false;
nsLoadFlags loadFlags;
nsresult rv = aChannel->GetLoadFlags(&loadFlags);
if (NS_FAILED(rv)) {