mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
Giannis Adamopoulos (johnyadams@hotmail.com)
- Check if lpLogFont is NULL, so we don't crash if it is. Verified by the GDI32 Wine test, which explicitly checks for this behaviour and doesn't crash under WinXP SP2. See issue #3725 for more details. svn path=/trunk/; revision=36092
This commit is contained in:
parent
0abf5b122d
commit
bdf36ed7e5
1 changed files with 8 additions and 3 deletions
|
@ -391,12 +391,17 @@ int STDCALL
|
|||
EnumFontFamiliesExA (HDC hdc, LPLOGFONTA lpLogfont, FONTENUMPROCA lpEnumFontFamExProc,
|
||||
LPARAM lParam, DWORD dwFlags)
|
||||
{
|
||||
LOGFONTW LogFontW;
|
||||
LOGFONTW LogFontW, *pLogFontW;
|
||||
|
||||
LogFontA2W(&LogFontW, lpLogfont);
|
||||
if (lpLogfont)
|
||||
{
|
||||
LogFontA2W(&LogFontW,lpLogfont);
|
||||
pLogFontW = &LogFontW;
|
||||
}
|
||||
else pLogFontW = NULL;
|
||||
|
||||
/* no need to convert LogFontW back to lpLogFont b/c it's an [in] parameter only */
|
||||
return IntEnumFontFamilies(hdc, &LogFontW, lpEnumFontFamExProc, lParam, FALSE);
|
||||
return IntEnumFontFamilies(hdc, pLogFontW, lpEnumFontFamExProc, lParam, FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue