[hhctrl.ocx] Make sure pszCaption and pszFile are never 0

Jaroslav Šmíd jardasmid at gmail.com
Sat Jun 26 15:52:49 CDT 2010


Sorry, with txt extension

On Sat, Jun 26, 2010 at 10:52 PM, Jaroslav Šmíd <jardasmid at gmail.com> wrote:
> Attached
>
> On Sat, Jun 26, 2010 at 10:43 PM, Sven Baars <sven.wine at gmail.com> wrote:
>> Charles Davis wrote:
>>>
>>> On Jun 26, 2010, at 2:32 PM, Jaroslav Šmíd wrote:
>>>
>>>
>>>>
>>>> ---
>>>> dlls/hhctrl.ocx/chm.c |    4 ++--
>>>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/dlls/hhctrl.ocx/chm.c b/dlls/hhctrl.ocx/chm.c
>>>> index 4c85bd9..f0452fa 100644
>>>> --- a/dlls/hhctrl.ocx/chm.c
>>>> +++ b/dlls/hhctrl.ocx/chm.c
>>>> @@ -238,11 +238,11 @@ BOOL LoadWinTypeFromCHM(HHInfo *info)
>>>>         info->WinType.pszIndex = strdupW(null);
>>>>         info->WinType.fsValidMembers=0;
>>>>         info->WinType.fsWinProperties=HHWIN_PROP_TRI_PANE;
>>>> -        info->WinType.pszCaption=strdupW(info->pCHMInfo->defTitle);
>>>> +        info->WinType.pszCaption=strdupW(info->pCHMInfo->defTitle ?
>>>> info->pCHMInfo->defTitle : null);
>>>>         info->WinType.dwStyles=WS_POPUP;
>>>>         info->WinType.dwExStyles=0;
>>>>         info->WinType.nShowState=SW_SHOW;
>>>> -        info->WinType.pszFile=strdupW(info->pCHMInfo->defTopic);
>>>> +        info->WinType.pszFile=strdupW(info->pCHMInfo->defTopic ?
>>>> info->pCHMInfo->defTopic : null);
>>>>         info->WinType.curNavType=HHWIN_NAVTYPE_TOC;
>>>>         return TRUE;
>>>>     }
>>>>
>>>
>>> Your mailer mangled the patch, such that long lines are broken into two
>>> lines. THAT is what we mean by "your patch got wrapped". We can't apply your
>>> patch in this state, so you'll have to send it again after configuring your
>>> mail client not to wrap long lines.
>>>
>>> Chip
>>>
>>>
>>>
>>>
>>
>> Or you could just attach them instead. That way the patch can't get mangled.
>> Some mail clients just can't be trusted (like Thunderbird, which is what I'm
>> using).
>>
>> Sven
>>
>>
>>
>>
>
>
>
> --
> Jaroslav Šmíd
>



-- 
Jaroslav Šmíd
-------------- next part --------------
From cfbe90a73392d4804d55cfd6ee11fba8977d80bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaroslav=20=C5=A0m=C3=ADd?= <jardik at Jardik-PC.(none)>
Date: Sat, 26 Jun 2010 22:24:04 +0200
Subject: Make sure pszCaption and pszFile are never NULL

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

diff --git a/dlls/hhctrl.ocx/chm.c b/dlls/hhctrl.ocx/chm.c
index 4c85bd9..f0452fa 100644
--- a/dlls/hhctrl.ocx/chm.c
+++ b/dlls/hhctrl.ocx/chm.c
@@ -238,11 +238,11 @@ BOOL LoadWinTypeFromCHM(HHInfo *info)
         info->WinType.pszIndex = strdupW(null);
         info->WinType.fsValidMembers=0;
         info->WinType.fsWinProperties=HHWIN_PROP_TRI_PANE;
-        info->WinType.pszCaption=strdupW(info->pCHMInfo->defTitle);
+        info->WinType.pszCaption=strdupW(info->pCHMInfo->defTitle ? info->pCHMInfo->defTitle : null);
         info->WinType.dwStyles=WS_POPUP;
         info->WinType.dwExStyles=0;
         info->WinType.nShowState=SW_SHOW;
-        info->WinType.pszFile=strdupW(info->pCHMInfo->defTopic);
+        info->WinType.pszFile=strdupW(info->pCHMInfo->defTopic ? info->pCHMInfo->defTopic : null);
         info->WinType.curNavType=HHWIN_NAVTYPE_TOC;
         return TRUE;
     }
-- 
1.7.0.4


More information about the wine-devel mailing list