From: Jiajin Cui <cuijiajin(a)uniontech.com> If we're going to allow replacements of replacements,get_family_face_list will be error. Signed-off-by: Jiajin Cui <cuijiajin(a)uniontech.com> --- dlls/win32u/font.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c index e26c7bfa316..9f24fe716df 100644 --- a/dlls/win32u/font.c +++ b/dlls/win32u/font.c @@ -903,6 +903,12 @@ static BOOL add_family_replacement( const WCHAR *new_name, const WCHAR *replace return FALSE; } + if(family->replacement) + { + WARN( "%s is replaced by another font!\n", debugstr_w(replace)); + return FALSE; + } + if (!(new_family = create_family( new_name, NULL ))) return FALSE; new_family->replacement = family; family->refcount++; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/628