From: Jiajin Cui cuijiajin@uniontech.com
If we're going to allow replacements of replacements,get_family_face_list will be error.
Signed-off-by: Jiajin Cui cuijiajin@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++;