avifil32: Add missing AddRefs in IAVIFile_QueryInterface().

This commit is contained in:
Francois Gouget 2009-03-10 12:38:20 +01:00 committed by Alexandre Julliard
parent 5dbe136027
commit f884cf0ddf
1 changed files with 3 additions and 0 deletions

View File

@ -251,13 +251,16 @@ static HRESULT WINAPI IAVIFile_fnQueryInterface(IAVIFile *iface, REFIID refiid,
if (IsEqualGUID(&IID_IUnknown, refiid) ||
IsEqualGUID(&IID_IAVIFile, refiid)) {
*obj = iface;
IAVIFile_AddRef(iface);
return S_OK;
} else if (This->fInfo.dwStreams == 1 &&
IsEqualGUID(&IID_IAVIStream, refiid)) {
*obj = &This->iAVIStream;
IAVIFile_AddRef(iface);
return S_OK;
} else if (IsEqualGUID(&IID_IPersistFile, refiid)) {
*obj = &This->iPersistFile;
IAVIFile_AddRef(iface);
return S_OK;
}