Commit a6190338 authored by Erich Hoover's avatar Erich Hoover Committed by Alexandre Julliard

hhctrl.ocx: Do not permit a NULL caption for HtmlHelp windows.

parent 56503620
...@@ -366,10 +366,8 @@ BOOL LoadWinTypeFromCHM(HHInfo *info) ...@@ -366,10 +366,8 @@ BOOL LoadWinTypeFromCHM(HHInfo *info)
wintype.cbStruct = sizeof(wintype); wintype.cbStruct = sizeof(wintype);
wintype.fUniCodeStrings = TRUE; wintype.fUniCodeStrings = TRUE;
wintype.pszType = pszType = strdupW(info->pCHMInfo->defWindow ? info->pCHMInfo->defWindow : defaultwinW); wintype.pszType = pszType = strdupW(info->pCHMInfo->defWindow ? info->pCHMInfo->defWindow : defaultwinW);
wintype.pszFile = pszFile = strdupW(info->pCHMInfo->defTopic ? info->pCHMInfo->defTopic : null);
wintype.pszToc = pszToc = strdupW(info->pCHMInfo->defToc ? info->pCHMInfo->defToc : null); wintype.pszToc = pszToc = strdupW(info->pCHMInfo->defToc ? info->pCHMInfo->defToc : null);
wintype.pszIndex = pszIndex = strdupW(null); wintype.pszIndex = pszIndex = strdupW(null);
wintype.pszCaption = pszCaption = strdupW(info->pCHMInfo->defTitle ? info->pCHMInfo->defTitle : null);
wintype.fsValidMembers = 0; wintype.fsValidMembers = 0;
wintype.fsWinProperties = HHWIN_PROP_TRI_PANE; wintype.fsWinProperties = HHWIN_PROP_TRI_PANE;
wintype.dwStyles = WS_POPUP; wintype.dwStyles = WS_POPUP;
...@@ -380,6 +378,8 @@ BOOL LoadWinTypeFromCHM(HHInfo *info) ...@@ -380,6 +378,8 @@ BOOL LoadWinTypeFromCHM(HHInfo *info)
/* merge the new data with any pre-existing HH_WINTYPE structure */ /* merge the new data with any pre-existing HH_WINTYPE structure */
MergeChmProperties(&wintype, info, FALSE); MergeChmProperties(&wintype, info, FALSE);
if (!info->WinType.pszCaption)
info->WinType.pszCaption = info->stringsW.pszCaption = strdupW(info->pCHMInfo->defTitle ? info->pCHMInfo->defTitle : null);
if (!info->WinType.pszFile) if (!info->WinType.pszFile)
info->WinType.pszFile = info->stringsW.pszFile = strdupW(info->pCHMInfo->defTopic ? info->pCHMInfo->defTopic : null); info->WinType.pszFile = info->stringsW.pszFile = strdupW(info->pCHMInfo->defTopic ? info->pCHMInfo->defTopic : null);
if (!info->WinType.pszToc) if (!info->WinType.pszToc)
......
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