[2/3] dwrite: Layout can't be created without text format

Nikolay Sivov nsivov at codeweavers.com
Fri Oct 26 05:32:28 CDT 2012


Layout can't be created without text format
-------------- next part --------------
>From 9d9f82145475bb5510c84ab81abdb36a62360799 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov at codeweavers.com>
Date: Fri, 26 Oct 2012 12:10:47 -0400
Subject: [PATCH 2/4] Layout can't be created without text format

---
 dlls/dwrite/layout.c |   13 +++++--------
 1 file 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;
 
-- 
1.7.10.4




More information about the wine-patches mailing list