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) ...@@ -257,12 +257,14 @@ static void test_gettext(void)
GetClientRect(hwnd, &toolinfoA.rect); GetClientRect(hwnd, &toolinfoA.rect);
r = SendMessageA(hwnd, TTM_ADDTOOL, 0, (LPARAM)&toolinfoA); r = SendMessageA(hwnd, TTM_ADDTOOL, 0, (LPARAM)&toolinfoA);
ok(r, "Adding the tool to the tooltip failed\n"); ok(r, "Adding the tool to the tooltip failed\n");
if (r)
toolinfoA.hwnd = NULL; {
toolinfoA.uId = (UINT_PTR)0x1234ABCD; toolinfoA.hwnd = NULL;
toolinfoA.lpszText = bufA; toolinfoA.uId = (UINT_PTR)0x1234ABCD;
SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); toolinfoA.lpszText = bufA;
ok(strcmp(toolinfoA.lpszText, "") == 0, "lpszText should be an empty string\n"); SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA);
ok(strcmp(toolinfoA.lpszText, "") == 0, "lpszText should be an empty string\n");
}
DestroyWindow(hwnd); 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