riched20: Handle range method failures in IsEqual (Coverity).
This commit is contained in:
parent
5f933018a2
commit
3889dadcca
|
@ -2048,10 +2048,11 @@ static HRESULT textrange_isequal(LONG start, LONG end, ITextRange *range, LONG *
|
||||||
if (!ret)
|
if (!ret)
|
||||||
ret = &v;
|
ret = &v;
|
||||||
|
|
||||||
ITextRange_GetStart(range, &from);
|
if (FAILED(ITextRange_GetStart(range, &from)) || FAILED(ITextRange_GetEnd(range, &to))) {
|
||||||
ITextRange_GetEnd(range, &to);
|
*ret = tomFalse;
|
||||||
|
}
|
||||||
*ret = (start == from && end == to) ? tomTrue : tomFalse;
|
else
|
||||||
|
*ret = (start == from && end == to) ? tomTrue : tomFalse;
|
||||||
return *ret == tomTrue ? S_OK : S_FALSE;
|
return *ret == tomTrue ? S_OK : S_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue