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:
parent
c2a876c041
commit
bf7b21ec7b
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue