No, from updateCompStr

     if (old == NULL && compstr == NULL && len == 0)
         return NULL;

Otherwise it returns a compstr. So it only should return NULL if all the 
incoming parameters are NULL, which i do not believe should ever happen 
after i went through and made sure that the hCompStr was never NULL.

-aric

Kusanagi Kouichi wrote:
> On Fri, Apr 25, 2008 at 09:36:36AM -0500, Aric Stewart wrote:
>> Comming in a bit late on this one, (missed the patch submission)
>>
>> I do not think this is correct as far as i know hCompStr should never be 
>> NULL. Much of our code depends on that not being NULL.
>>
>> I would recommend using ImeCreateBlankCompStr instead. (something like 
>> below)
>>
>> diff --git a/dlls/winex11.drv/ime.c b/dlls/winex11.drv/ime.c
>> index f50549f..8fa6f6f 100644
>> --- a/dlls/winex11.drv/ime.c
>> +++ b/dlls/winex11.drv/ime.c
>> @@ -778,7 +778,7 @@ BOOL WINAPI NotifyIME(HIMC hIMC, DWORD dwAction, 
>> DWORD dwInd
>>                       if (lpIMC->hCompStr)
>>                       {
>>                           ImmDestroyIMCC(lpIMC->hCompStr);
>> -                        lpIMC->hCompStr = NULL;
>> +                        lpIMC->hCompStr = ImeCreateBlankCompStr();
>>                       }
>>
>>                       myPrivate = 
>> (LPIMEPRIVATE)ImmLockIMCC(lpIMC->hPrivate);
>>
>> -aric
> 
> Then, are these also wrong? updateCompStr returns NULL if NULL or 0 is given.
>    748                                newCompStr = 
> updateCompStr(lpIMC->hCompStr, NULL, 0);
>    749                                ImmDestroyIMCC(lpIMC->hCompStr);
>    750                                lpIMC->hCompStr = newCompStr;
> 
>    897                    newCompStr = updateCompStr(lpIMC->hCompStr, NULL, 
> 0);
>    898                    ImmDestroyIMCC(lpIMC->hCompStr);
>    899                    lpIMC->hCompStr = newCompStr;
> 
> 


Reply via email to