Add NULL check for sinkInterface in DataCache_GetAdvise.

This commit is contained in:
Alex Villacís Lasso 2005-09-28 18:12:58 +00:00 committed by Alexandre Julliard
parent a90c11330e
commit 1e26f9601d
1 changed files with 3 additions and 1 deletions

View File

@ -1390,9 +1390,11 @@ static HRESULT WINAPI DataCache_GetAdvise(
if (ppAdvSink!=NULL)
{
IAdviseSink_QueryInterface(this->sinkInterface,
if (this->sinkInterface != NULL)
IAdviseSink_QueryInterface(this->sinkInterface,
&IID_IAdviseSink,
(void**)ppAdvSink);
else *ppAdvSink = NULL;
}
return S_OK;