Module: wine Branch: master Commit: 1177bbaa9e4bb2330936b987caa623c1b3e4e394 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1177bbaa9e4bb2330936b987ca...
Author: Francois Gouget fgouget@free.fr Date: Sun Sep 28 18:41:02 2008 +0200
comctl32/tests: Don't crash if adding the tooltip failed.
---
dlls/comctl32/tests/tooltips.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/dlls/comctl32/tests/tooltips.c b/dlls/comctl32/tests/tooltips.c index 6bf5a3a..7454b6f 100644 --- a/dlls/comctl32/tests/tooltips.c +++ b/dlls/comctl32/tests/tooltips.c @@ -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);