dwrite: Avoid triggering an exception on DLL_PROCESS_DETACH.

Dmitry Timoshkov dmitry at baikal.ru
Mon Jan 28 00:37:36 CST 2013


In the most cases it's hidden by the PE loader exception handler, but it's
better to not generate unnecessary exceptions.
---
 dlls/dwrite/font.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
index 0ec581b..191397e 100644
--- a/dlls/dwrite/font.c
+++ b/dlls/dwrite/font.c
@@ -793,7 +793,8 @@ static void release_font_collection(IDWriteFontCollection *iface)
 
 void release_system_fontcollection(void)
 {
-    release_font_collection(system_collection);
+    if (system_collection)
+        release_font_collection(system_collection);
 }
 
 HRESULT get_system_fontcollection(IDWriteFontCollection **collection)
-- 
1.8.0.2




More information about the wine-patches mailing list