Commit ae3b3346 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/toolbar: Handle NULL string pointer from TBN_GETINFOTIPW.

parent 27eee2d9
......@@ -159,6 +159,7 @@ static LRESULT parent_wnd_notify(LPARAM lParam)
break;
case TBN_GETINFOTIPA:
case TBN_GETINFOTIPW:
{
NMTBGETINFOTIPA *tbgit = (NMTBGETINFOTIPA*)lParam;
......@@ -2029,6 +2030,9 @@ static void test_tooltip(void)
g_ResetDispTextPtr = TRUE;
SendMessageA(hToolbar, WM_NOTIFY, 0, (LPARAM)&nmtti);
/* Same for TBN_GETINFOTIPW */
SendMessageA(hToolbar, TB_SETUNICODEFORMAT, TRUE, 0);
SendMessageA(hToolbar, WM_NOTIFY, 0, (LPARAM)&nmtti);
g_ResetDispTextPtr = FALSE;
DestroyWindow(hToolbar);
......
......@@ -6149,7 +6149,7 @@ static LRESULT TOOLBAR_TTGetDispInfo (TOOLBAR_INFO *infoPtr, NMTTDISPINFOW *lpnm
TRACE("TBN_GETINFOTIPW - got string %s\n", debugstr_w(tbgit.pszText));
len = lstrlenW(tbgit.pszText);
len = tbgit.pszText ? lstrlenW(tbgit.pszText) : 0;
if (len > ARRAY_SIZE(lpnmtdi->szText) - 1)
{
/* need to allocate temporary buffer in infoPtr as there
......
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