Nikolay Sivov : dwrite: Layout can't be created without text format.
Module: wine Branch: master Commit: fcae48a08cffec0c7af37f8fe519b0b8c5821208 URL: http://source.winehq.org/git/wine.git/?a=commit;h=fcae48a08cffec0c7af37f8fe5... Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Oct 26 12:10:47 2012 -0400 dwrite: Layout can't be created without text format. --- dlls/dwrite/layout.c | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 153716b..76c5adb 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -681,14 +681,11 @@ HRESULT create_textlayout(const WCHAR *str, UINT32 len, IDWriteTextFormat *forma memset(&This->format, 0, sizeof(This->format)); /* reference is not kept here, instead copy all underlying data */ - if (format) - { - IDWriteTextFormat_GetFontCollection(format, &This->format.collection); - This->format.weight = IDWriteTextFormat_GetFontWeight(format); - This->format.style = IDWriteTextFormat_GetFontStyle(format); - This->format.stretch = IDWriteTextFormat_GetFontStretch(format); - This->format.size = IDWriteTextFormat_GetFontSize(format); - } + IDWriteTextFormat_GetFontCollection(format, &This->format.collection); + This->format.weight = IDWriteTextFormat_GetFontWeight(format); + This->format.style = IDWriteTextFormat_GetFontStyle(format); + This->format.stretch = IDWriteTextFormat_GetFontStretch(format); + This->format.size = IDWriteTextFormat_GetFontSize(format); *layout = &This->IDWriteTextLayout_iface;
participants (1)
-
Alexandre Julliard