From: Jiajin Cui cuijiajin@uniontech.com
This is to prevent replacement loops. --- dlls/win32u/font.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c index e26c7bfa316..e281db9b0c8 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) + { + TRACE( "%s is replaced by another font, skipping.\n", debugstr_w(replace) ); + return FALSE; + } + if (!(new_family = create_family( new_name, NULL ))) return FALSE; new_family->replacement = family; family->refcount++;