Commit 94d7abce authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Keep corresponding data context for created backend object.

parent 828e7173
......@@ -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);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment