_nrroffuncs: Check for error before dereferencing returned pointer.

This commit is contained in:
Marcus Meissner 2003-09-22 19:21:32 +00:00 committed by Alexandre Julliard
parent ccc7570b84
commit 995389ef57

View File

@ -265,10 +265,10 @@ static int _nroffuncs(ITypeInfo *tinfo) {
n=0;
while (1) {
hres = ITypeInfo_GetFuncDesc(tinfo,n,&fdesc);
if (fdesc->oVft/4 > max)
max = fdesc->oVft/4;
if (hres)
return max+1;
if (fdesc->oVft/4 > max)
max = fdesc->oVft/4;
n++;
}
/*NOTREACHED*/