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

Alexandre Julliard julliard at winehq.org
Wed Sep 5 15:36:46 CDT 2012


Module: wine
Branch: master
Commit: a61903388eb11a8c5c5e4929ebdcaccedd67430f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a61903388eb11a8c5c5e4929ebdcaccedd67430f

Author: Erich Hoover <ehoover at mines.edu>
Date:   Wed Sep  5 10:36:39 2012 -0600

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

---

 dlls/hhctrl.ocx/chm.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/hhctrl.ocx/chm.c b/dlls/hhctrl.ocx/chm.c
index bff7186..88bd6e5 100644
--- a/dlls/hhctrl.ocx/chm.c
+++ b/dlls/hhctrl.ocx/chm.c
@@ -366,10 +366,8 @@ BOOL LoadWinTypeFromCHM(HHInfo *info)
         wintype.cbStruct = sizeof(wintype);
         wintype.fUniCodeStrings = TRUE;
         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.pszIndex   = pszIndex    = strdupW(null);
-        wintype.pszCaption = pszCaption  = strdupW(info->pCHMInfo->defTitle ? info->pCHMInfo->defTitle : null);
         wintype.fsValidMembers = 0;
         wintype.fsWinProperties = HHWIN_PROP_TRI_PANE;
         wintype.dwStyles = WS_POPUP;
@@ -380,12 +378,14 @@ BOOL LoadWinTypeFromCHM(HHInfo *info)
 
     /* merge the new data with any pre-existing HH_WINTYPE structure */
     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)
-        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)
-        info->WinType.pszToc   = info->stringsW.pszToc   = FindHTMLHelpSetting(info, toc_extW);
+        info->WinType.pszToc     = info->stringsW.pszToc     = FindHTMLHelpSetting(info, toc_extW);
     if (!info->WinType.pszIndex)
-        info->WinType.pszIndex = info->stringsW.pszIndex = FindHTMLHelpSetting(info, index_extW);
+        info->WinType.pszIndex   = info->stringsW.pszIndex   = FindHTMLHelpSetting(info, index_extW);
 
     heap_free(pszType);
     heap_free(pszFile);




More information about the wine-cvs mailing list