msctf: Fix a possible NULL dereference (Coverity).

This commit is contained in:
Paul Vriens 2009-06-05 09:20:27 +02:00 committed by Alexandre Julliard
parent b3e4155a41
commit e42d7f9591
1 changed files with 3 additions and 1 deletions

View File

@ -349,11 +349,13 @@ HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, DWORD l
HRESULT TF_SELECTION_to_TS_SELECTION_ACP(const TF_SELECTION *tf, TS_SELECTION_ACP *tsAcp)
{
Range *This = (Range *)tf->range;
Range *This;
if (!tf || !tsAcp || !tf->range)
return E_INVALIDARG;
This = (Range *)tf->range;
tsAcp->acpStart = This->anchorStart;
tsAcp->acpEnd = This->anchorEnd;
tsAcp->style.ase = tf->style.ase;