[PATCH 4/5] dwrite: Keep corresponding data context for created backend object.
Nikolay Sivov
nsivov at codeweavers.com
Wed Dec 8 05:10:45 CST 2021
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/dwrite/font.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
index 22fb3369bc7..ffe012d3029 100644
--- a/dlls/dwrite/font.c
+++ b/dlls/dwrite/font.c
@@ -5316,10 +5316,15 @@ static UINT64 dwrite_fontface_get_font_object(struct dwrite_fontface *fontface)
return 0;
}
- if (InterlockedCompareExchange64((LONGLONG *)&fontface->font_object, font_object, 0))
+ if (!InterlockedCompareExchange64((LONGLONG *)&fontface->font_object, font_object, 0))
+ {
+ fontface->data_context = data_context;
+ }
+ else
{
release_params.object = font_object;
UNIX_CALL(release_font_object, &release_params);
+ IDWriteFontFileStream_ReleaseFileFragment(fontface->stream, data_context);
}
}
}
--
2.33.0
More information about the wine-devel
mailing list