From 2eaf0cf8fd6e7c290497fedb08134a89e7b49b1d Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Thu, 19 Mar 2015 17:34:42 +0400 Subject: Update bundled FreeType to 2.5.5 Removed everything, imported with help of import_from_tarball.sh script, and then added a pre-generated builds/unix/ftconfig.h Task-number: QTBUG-44648 Change-Id: Iea948e41f7761f1580382b3763d04c7a61383382 Reviewed-by: Lars Knoll --- src/3rdparty/freetype/src/base/ftgxval.c | 35 ++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 11 deletions(-) (limited to 'src/3rdparty/freetype/src/base/ftgxval.c') diff --git a/src/3rdparty/freetype/src/base/ftgxval.c b/src/3rdparty/freetype/src/base/ftgxval.c index 32662bed87..a65f4c879b 100644 --- a/src/3rdparty/freetype/src/base/ftgxval.c +++ b/src/3rdparty/freetype/src/base/ftgxval.c @@ -4,7 +4,7 @@ /* */ /* FreeType API for validating TrueTyepGX/AAT tables (body). */ /* */ -/* Copyright 2004, 2005, 2006 by */ +/* Copyright 2004-2006, 2010, 2013, 2014 by */ /* Masatake YAMATO, Redhat K.K, */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ @@ -26,6 +26,8 @@ #include +#include FT_INTERNAL_DEBUG_H + #include FT_INTERNAL_OBJECTS_H #include FT_SERVICE_GX_VALIDATE_H @@ -44,13 +46,13 @@ if ( !face ) { - error = FT_Err_Invalid_Face_Handle; + error = FT_THROW( Invalid_Face_Handle ); goto Exit; } - if ( tables == NULL ) + if ( !tables ) { - error = FT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -62,7 +64,7 @@ tables, table_length ); else - error = FT_Err_Unimplemented_Feature; + error = FT_THROW( Unimplemented_Feature ); Exit: return error; @@ -73,8 +75,13 @@ FT_TrueTypeGX_Free( FT_Face face, FT_Bytes table ) { - FT_Memory memory = FT_FACE_MEMORY( face ); + FT_Memory memory; + + + if ( !face ) + return; + memory = FT_FACE_MEMORY( face ); FT_FREE( table ); } @@ -91,13 +98,13 @@ if ( !face ) { - error = FT_Err_Invalid_Face_Handle; + error = FT_THROW( Invalid_Face_Handle ); goto Exit; } - if ( ckern_table == NULL ) + if ( !ckern_table ) { - error = FT_Err_Invalid_Argument; + error = FT_THROW( Invalid_Argument ); goto Exit; } @@ -108,7 +115,7 @@ validation_flags, ckern_table ); else - error = FT_Err_Unimplemented_Feature; + error = FT_THROW( Unimplemented_Feature ); Exit: return error; @@ -119,7 +126,13 @@ FT_ClassicKern_Free( FT_Face face, FT_Bytes table ) { - FT_Memory memory = FT_FACE_MEMORY( face ); + FT_Memory memory; + + + if ( !face ) + return; + + memory = FT_FACE_MEMORY( face ); FT_FREE( table ); -- cgit v1.2.3