[PATCH] stop crash in font tests
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Mon Jun 16 07:30:33 CDT 2008
---
dlls/gdi32/tests/font.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index 710148a..dd78da5 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -1317,7 +1317,8 @@ static void test_EnumFontFamilies(const char *font_name, INT font_charset)
/* Observed behaviour: EnumFontFamilies enumerates aliases like "Arial Cyr"
* while EnumFontFamiliesEx doesn't.
*/
- if (!*font_name && font_charset == DEFAULT_CHARSET) /* do it only once */
+ /* EnumFontFamilies with the NULL parameter crashes win98 */
+ if (pGetCharABCWidthsW && !*font_name && font_charset == DEFAULT_CHARSET) /* do it only once */
{
efd.total = 0;
SetLastError(0xdeadbeef);
@@ -1502,6 +1503,9 @@ static void test_negative_width(HDC hdc, const LOGFONTA *lf)
LOGFONTA lf2 = *lf;
WORD idx;
MAT2 mat = { {0,1}, {0,0}, {0,0}, {0,1} };
+
+ if(!pGetGlyphIndicesA)
+ return;
/* negative widths are handled just as positive ones */
lf2.lfWidth = -lf->lfWidth;
--
1.5.4.1
--------------030806000903050201040007--
More information about the wine-patches
mailing list