shithub: freetype+ttf2subf

Download patch

ref: f4f9e6880036304912c9da39fa94a343131fdb82
parent: 04c2aa18bf05dbedc88212caa7eb93fb0839bdd3
author: Werner Lemberg <[email protected]>
date: Tue Nov 25 06:11:55 EST 2014

*/*: s/Invalid_Argument/Invalid_Library_Handle/ where appropriate.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2014-11-25  Werner Lemberg  <[email protected]>
 
+	*/*: s/Invalid_Argument/Invalid_Library_Handle/ where appropriate.
+
+2014-11-25  Werner Lemberg  <[email protected]>
+
 	*/*: s/Invalid_Argument/Invalid_Outline/ where appropriate.
 
 2014-11-25  Werner Lemberg  <[email protected]>
--- a/src/base/ftlcdfil.c
+++ b/src/base/ftlcdfil.c
@@ -289,7 +289,10 @@
   FT_Library_SetLcdFilterWeights( FT_Library      library,
                                   unsigned char  *weights )
   {
-    if ( !library || !weights )
+    if ( !library )
+      return FT_THROW( Invalid_Library_Handle );
+
+    if ( !weights )
       return FT_THROW( Invalid_Argument );
 
     ft_memcpy( library->lcd_weights, weights, 5 );
@@ -311,7 +314,7 @@
 
 
     if ( !library )
-      return FT_THROW( Invalid_Argument );
+      return FT_THROW( Invalid_Library_Handle );
 
     switch ( filter )
     {
--- a/src/base/ftstroke.c
+++ b/src/base/ftstroke.c
@@ -795,7 +795,7 @@
 
 
     if ( !library )
-      return FT_THROW( Invalid_Argument );
+      return FT_THROW( Invalid_Library_Handle );
 
     memory = library->memory;