Nikolay Sivov : dwrite: Layout can't be created without text format.
Alexandre Julliard
julliard at winehq.org
Fri Oct 26 11:36:20 CDT 2012
Module: wine
Branch: master
Commit: fcae48a08cffec0c7af37f8fe519b0b8c5821208
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fcae48a08cffec0c7af37f8fe519b0b8c5821208
Author: Nikolay Sivov <nsivov at 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;
More information about the wine-cvs
mailing list