From e6dd5d1cadee3666fcb1c7dc8bb780d7bafa9c13 Mon Sep 17 00:00:00 2001 From: Slava Monich Date: Sat, 8 Jul 2000 18:27:24 +0000 Subject: [PATCH] Check the value returned by DIALOG_GetCharSize. --- windows/dialog.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/windows/dialog.c b/windows/dialog.c index c02c7f65e55..e3a72aeafd2 100644 --- a/windows/dialog.c +++ b/windows/dialog.c @@ -688,9 +688,11 @@ HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate, if (hFont) { SIZE charSize; - DIALOG_GetCharSize(hFont,&charSize); - xUnit = charSize.cx; - yUnit = charSize.cy; + if (DIALOG_GetCharSize(hFont,&charSize)) + { + xUnit = charSize.cx; + yUnit = charSize.cy; + } } TRACE("units = %d,%d\n", xUnit, yUnit ); } -- 2.11.4.GIT