Bug 1114851 - Null check in NS_GetStreamForMediaStreamURI, r=smaug

This commit is contained in:
Andrea Marchesini 2014-12-23 19:43:29 +01:00
parent d61efa95c5
commit d8a7c2cb35

View File

@ -642,8 +642,13 @@ NS_GetStreamForMediaStreamURI(nsIURI* aURI, mozilla::DOMMediaStream** aStream)
{
NS_ASSERTION(IsMediaStreamURI(aURI), "Only call this with mediastream URIs");
nsISupports* dataObject = GetDataObject(aURI);
if (!dataObject) {
return NS_ERROR_DOM_BAD_URI;
}
*aStream = nullptr;
return CallQueryInterface(GetDataObject(aURI), aStream);
return CallQueryInterface(dataObject, aStream);
}
NS_IMETHODIMP