without freetype, some calling return failed, so some value may not be initialized (it initialize by some failed calling and pass argument by point of it), it would cause random crash!
Signed-off-by: Fan WenJie fanwj@mail.ustc.edu.cn
-- v12: win32u: fix random crash without libfreetype
From: Fan WenJie fanwj@mail.ustc.edu.cn
Signed-off-by: Fan WenJie fanwj@mail.ustc.edu.cn --- dlls/win32u/sysparams.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index afa75928c94..28f2f58f623 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -4335,6 +4335,7 @@ LONG get_char_dimensions( HDC hdc, TEXTMETRICW *metric, int *height ) 'r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H', 'I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
+ if (height) *height = 0; if (metric && !NtGdiGetTextMetricsW( hdc, metric, 0 )) return 0;
if (!NtGdiGetTextExtentExW( hdc, abcdW, ARRAYSIZE(abcdW), 0, NULL, NULL, &sz, 0 ))