Commit 1177bbaa authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

comctl32/tests: Don't crash if adding the tooltip failed.

parent d1ab3b09
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment