[1/2] gdi32: Handle errors in WineEngAddFontResourceEx

Dmitry Timoshkov dmitry at codeweavers.com
Fri May 4 02:25:38 CDT 2007


Hello,

Changelog:
    gdi32: Handle errors in WineEngAddFontResourceEx

---
 dlls/gdi32/freetype.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index caadf4b..65c234f 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -1729,11 +1729,13 @@ INT WineEngAddFontResourceEx(LPCWSTR file, DWORD flags, PVOID pdv)
 
         if((unixname = wine_get_unix_file_name(file)))
         {
-            AddFontFileToList(unixname, NULL, NULL, ADDFONT_FORCE_BITMAP);
+            INT ret;
+            ret = AddFontFileToList(unixname, NULL, NULL, ADDFONT_FORCE_BITMAP);
             HeapFree(GetProcessHeap(), 0, unixname);
+            return ret;
         }
     }
-    return 1;
+    return 0;
 }
 
 /*************************************************************
-- 
1.5.1.1






More information about the wine-patches mailing list