diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c index c16fd7e6f0..d7305957f5 100644 --- a/dlls/comctl32/tooltips.c +++ b/dlls/comctl32/tooltips.c @@ -2025,7 +2025,8 @@ TOOLTIPS_SetToolInfoA (HWND hwnd, WPARAM wParam, LPARAM lParam) else { if ( (toolPtr->lpszText) && !IS_INTRESOURCE(toolPtr->lpszText) ) { - Free (toolPtr->lpszText); + if( toolPtr->lpszText != LPSTR_TEXTCALLBACKW) + Free (toolPtr->lpszText); toolPtr->lpszText = NULL; } if (lpToolInfo->lpszText) { @@ -2082,7 +2083,8 @@ TOOLTIPS_SetToolInfoW (HWND hwnd, WPARAM wParam, LPARAM lParam) else { if ( (toolPtr->lpszText) && !IS_INTRESOURCE(toolPtr->lpszText) ) { - Free (toolPtr->lpszText); + if( toolPtr->lpszText != LPSTR_TEXTCALLBACKW) + Free (toolPtr->lpszText); toolPtr->lpszText = NULL; } if (lpToolInfo->lpszText) { @@ -2208,7 +2210,8 @@ TOOLTIPS_UpdateTipTextA (HWND hwnd, WPARAM wParam, LPARAM lParam) else { if ( (toolPtr->lpszText) && !IS_INTRESOURCE(toolPtr->lpszText) ) { - Free (toolPtr->lpszText); + if( toolPtr->lpszText != LPSTR_TEXTCALLBACKW) + Free (toolPtr->lpszText); toolPtr->lpszText = NULL; } if (lpToolInfo->lpszText) { @@ -2265,7 +2268,8 @@ TOOLTIPS_UpdateTipTextW (HWND hwnd, WPARAM wParam, LPARAM lParam) else { if ( (toolPtr->lpszText) && !IS_INTRESOURCE(toolPtr->lpszText) ) { - Free (toolPtr->lpszText); + if( toolPtr->lpszText != LPSTR_TEXTCALLBACKW) + Free (toolPtr->lpszText); toolPtr->lpszText = NULL; } if (lpToolInfo->lpszText) {