summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/pfr/pfrobjs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/freetype/src/pfr/pfrobjs.c')
-rw-r--r--src/3rdparty/freetype/src/pfr/pfrobjs.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/3rdparty/freetype/src/pfr/pfrobjs.c b/src/3rdparty/freetype/src/pfr/pfrobjs.c
index 180446d73..56d617d88 100644
--- a/src/3rdparty/freetype/src/pfr/pfrobjs.c
+++ b/src/3rdparty/freetype/src/pfr/pfrobjs.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR object methods (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006, 2007 by */
+/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -41,10 +41,15 @@
FT_LOCAL_DEF( void )
pfr_face_done( FT_Face pfrface ) /* PFR_Face */
{
- PFR_Face face = (PFR_Face)pfrface;
- FT_Memory memory = pfrface->driver->root.memory;
+ PFR_Face face = (PFR_Face)pfrface;
+ FT_Memory memory;
+ if ( !face )
+ return;
+
+ memory = pfrface->driver->root.memory;
+
/* we don't want dangling pointers */
pfrface->family_name = NULL;
pfrface->style_name = NULL;