From: James Tabor Date: Fri, 1 Nov 2013 06:43:56 +0000 (+0000) Subject: [User32] X-Git-Tag: ReactOS-0.3.16~861 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=c9372b80da256273db39f32397984b886f238c3d [User32] - Fix a condition that fails the dialog test_GetDlgItemText after running the msg test then run dialog again. svn path=/trunk/; revision=60820 --- diff --git a/reactos/win32ss/user/user32/windows/dialog.c b/reactos/win32ss/user/user32/windows/dialog.c index 1f78436ef47..c232a3804d8 100644 --- a/reactos/win32ss/user/user32/windows/dialog.c +++ b/reactos/win32ss/user/user32/windows/dialog.c @@ -2126,9 +2126,12 @@ GetDlgItem( int nIDDlgItem) { int i; - HWND *list = WIN_ListChildren(hDlg); + HWND *list; HWND ret = 0; + if (!hDlg) return 0; + + list = WIN_ListChildren(hDlg); if (!list) return 0; for (i = 0; list[i]; i++) if (GetWindowLongPtrW(list[i], GWLP_ID) == nIDDlgItem) break; @@ -2190,7 +2193,7 @@ GetDlgItemTextA( { HWND hWnd = GetDlgItem(hDlg, nIDDlgItem); if ( hWnd ) return GetWindowTextA(hWnd, lpString, nMaxCount); - if ( nMaxCount ) *lpString = 0; + if ( nMaxCount ) lpString[0] = '\0'; return 0; } @@ -2208,7 +2211,7 @@ GetDlgItemTextW( { HWND hWnd = GetDlgItem(hDlg, nIDDlgItem); if ( hWnd ) return GetWindowTextW(hWnd, lpString, nMaxCount); - if ( nMaxCount ) *lpString = 0; + if ( nMaxCount ) lpString[0] = '\0'; return 0; }