summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/freetype/src')
-rw-r--r--src/3rdparty/freetype/src/base/ftobjs.c2
-rw-r--r--src/3rdparty/freetype/src/gzip/zconf.h7
-rw-r--r--src/3rdparty/freetype/src/gzip/zlib.h7
-rw-r--r--src/3rdparty/freetype/src/gzip/zutil.h2
-rw-r--r--src/3rdparty/freetype/src/truetype/ttinterp.c1
-rw-r--r--src/3rdparty/freetype/src/truetype/ttpload.c6
6 files changed, 20 insertions, 5 deletions
diff --git a/src/3rdparty/freetype/src/base/ftobjs.c b/src/3rdparty/freetype/src/base/ftobjs.c
index 46bcd3bb8b..3403188594 100644
--- a/src/3rdparty/freetype/src/base/ftobjs.c
+++ b/src/3rdparty/freetype/src/base/ftobjs.c
@@ -1135,7 +1135,7 @@
if ( error )
{
destroy_charmaps( face, memory );
- if ( clazz->done_face )
+ if ( clazz->done_face && face )
clazz->done_face( face );
FT_FREE( internal );
FT_FREE( face );
diff --git a/src/3rdparty/freetype/src/gzip/zconf.h b/src/3rdparty/freetype/src/gzip/zconf.h
index 3abf0ba03b..bdaf57e300 100644
--- a/src/3rdparty/freetype/src/gzip/zconf.h
+++ b/src/3rdparty/freetype/src/gzip/zconf.h
@@ -5,6 +5,11 @@
/* @(#) $Id$ */
+#if defined(__ARMCC__) || defined(__CC_ARM)
+/* Ultra ugly hack that convinces RVCT to use the systems zlib */
+#include <stdapis/zconf.h>
+#else /* defined(__ARMCC__) || defined(__CC_ARM) */
+
#ifndef _ZCONF_H
#define _ZCONF_H
@@ -282,3 +287,5 @@ typedef uLong FAR uLongf;
#endif
#endif /* _ZCONF_H */
+
+#endif /* defined(__ARMCC__) || defined(__CC_ARM) */
diff --git a/src/3rdparty/freetype/src/gzip/zlib.h b/src/3rdparty/freetype/src/gzip/zlib.h
index 50d0d3f146..0f98fdcbd3 100644
--- a/src/3rdparty/freetype/src/gzip/zlib.h
+++ b/src/3rdparty/freetype/src/gzip/zlib.h
@@ -28,6 +28,11 @@
(zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
*/
+#if defined(__ARMCC__) || defined(__CC_ARM)
+/* Ultra ugly hack that convinces RVCT to use the systems zlib */
+#include <stdapis/zlib.h>
+#else /* defined(__ARMCC__) || defined(__CC_ARM) */
+
#ifndef _ZLIB_H
#define _ZLIB_H
@@ -828,3 +833,5 @@ ZEXTERN(int) inflateInit2_ OF((z_streamp strm, int windowBits,
#endif
#endif /* _ZLIB_H */
+
+#endif /* defined(__ARMCC__) || defined(__CC_ARM) */
diff --git a/src/3rdparty/freetype/src/gzip/zutil.h b/src/3rdparty/freetype/src/gzip/zutil.h
index c9688cd9c0..1949270998 100644
--- a/src/3rdparty/freetype/src/gzip/zutil.h
+++ b/src/3rdparty/freetype/src/gzip/zutil.h
@@ -182,7 +182,7 @@ typedef unsigned long ulg;
#endif
/* Diagnostic functions */
-#ifdef DEBUG
+#if defined(DEBUG) && !defined(_WIN32_WCE)
# include <stdio.h>
extern int z_verbose;
extern void z_error OF((char *m));
diff --git a/src/3rdparty/freetype/src/truetype/ttinterp.c b/src/3rdparty/freetype/src/truetype/ttinterp.c
index 13aa9a27c4..d1769b8d2a 100644
--- a/src/3rdparty/freetype/src/truetype/ttinterp.c
+++ b/src/3rdparty/freetype/src/truetype/ttinterp.c
@@ -805,6 +805,7 @@
return driver->context;
Fail:
+ FT_FREE( exec );
return NULL;
}
diff --git a/src/3rdparty/freetype/src/truetype/ttpload.c b/src/3rdparty/freetype/src/truetype/ttpload.c
index a311b03c00..ecdd7376e1 100644
--- a/src/3rdparty/freetype/src/truetype/ttpload.c
+++ b/src/3rdparty/freetype/src/truetype/ttpload.c
@@ -532,10 +532,10 @@
tt_face_free_hdmx( TT_Face face )
{
FT_Stream stream = face->root.stream;
- FT_Memory memory = stream->memory;
-
+ FT_Memory memory = stream ? stream->memory : NULL;
- FT_FREE( face->hdmx_record_sizes );
+ if ( face->hdmx_record_sizes )
+ FT_FREE( face->hdmx_record_sizes );
FT_FRAME_RELEASE( face->hdmx_table );
}