comctl32/tests: Don't crash if adding the tooltip failed.
This commit is contained in:
parent
d1ab3b097d
commit
1177bbaa9e
|
@ -257,12 +257,14 @@ static void test_gettext(void)
|
|||
GetClientRect(hwnd, &toolinfoA.rect);
|
||||
r = SendMessageA(hwnd, TTM_ADDTOOL, 0, (LPARAM)&toolinfoA);
|
||||
ok(r, "Adding the tool to the tooltip failed\n");
|
||||
|
||||
toolinfoA.hwnd = NULL;
|
||||
toolinfoA.uId = (UINT_PTR)0x1234ABCD;
|
||||
toolinfoA.lpszText = bufA;
|
||||
SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA);
|
||||
ok(strcmp(toolinfoA.lpszText, "") == 0, "lpszText should be an empty string\n");
|
||||
if (r)
|
||||
{
|
||||
toolinfoA.hwnd = NULL;
|
||||
toolinfoA.uId = (UINT_PTR)0x1234ABCD;
|
||||
toolinfoA.lpszText = bufA;
|
||||
SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA);
|
||||
ok(strcmp(toolinfoA.lpszText, "") == 0, "lpszText should be an empty string\n");
|
||||
}
|
||||
|
||||
DestroyWindow(hwnd);
|
||||
|
||||
|
|
Loading…
Reference in New Issue