forked from Mirrors/wine-wine
comctl32/toolbar: Handle NULL string pointer from TBN_GETINFOTIPW.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>stable
parent
27eee2d9ac
commit
ae3b334695
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue