mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
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:
parent
021f1ff90a
commit
d5f08cd7a3
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user