зеркало из https://github.com/mozilla/gecko-dev.git
Bug 789741 - Fix a crash in nsMediaSniffer::GetMIMETypeFromContent. r=bz
This commit is contained in:
Родитель
2ba921a9a1
Коммит
7683743c75
|
@ -75,6 +75,9 @@ nsMediaSniffer::GetMIMETypeFromContent(nsIRequest* aRequest,
|
|||
// For media, we want to sniff only if the Content-Type is unknown, or if it
|
||||
// is application/octet-stream.
|
||||
nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
|
||||
if (!channel) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
nsAutoCString contentType;
|
||||
nsresult rv = channel->GetContentType(contentType);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
|
Загрузка…
Ссылка в новой задаче