user32: If pTest was allocated, length has to be > 0 (Coverity).

This commit is contained in:
Kai Blin 2007-01-05 12:40:56 +01:00 committed by Alexandre Julliard
parent fb2a3914e1
commit 7bfe2b06c3
1 changed files with 1 additions and 2 deletions

View File

@ -995,8 +995,7 @@ static INT CBUpdateLBox( LPHEADCOMBO lphc, BOOL bSelect )
if( pText )
{
if( length ) GetWindowTextW( lphc->hWndEdit, pText, length + 1);
else pText[0] = '\0';
GetWindowTextW( lphc->hWndEdit, pText, length + 1);
idx = SendMessageW(lphc->hWndLBox, LB_FINDSTRING,
(WPARAM)(-1), (LPARAM)pText );
HeapFree( GetProcessHeap(), 0, pText );