wmp: Handle allocation failure in IWMPMedia_get_sourceURL.

Signed-off-by: Anton Romanov <theli.ua@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Anton Romanov 2018-03-14 23:19:06 -07:00 committed by Alexandre Julliard
parent c2a876c041
commit bf7b21ec7b
1 changed files with 7 additions and 2 deletions

View File

@ -1577,10 +1577,15 @@ static HRESULT WINAPI WMPMedia_get_isIdentical(IWMPMedia *iface, IWMPMedia *othe
static HRESULT WINAPI WMPMedia_get_sourceURL(IWMPMedia *iface, BSTR *pbstrSourceUrl)
{
WMPMedia *This = impl_from_IWMPMedia(iface);
BSTR url;
TRACE("(%p)->(%p)\n", This, pbstrSourceUrl);
*pbstrSourceUrl = SysAllocString(This->url);
url = SysAllocString(This->url);
if (url) {
*pbstrSourceUrl = url;
return S_OK;
}
return E_OUTOFMEMORY;
}
static HRESULT WINAPI WMPMedia_get_name(IWMPMedia *iface, BSTR *pbstrName)
{