Add a check to avoid a NULL pointer dereference.

Approved by:	sobomax (maintainer)
This commit is contained in:
Joe Marcus Clarke 2003-04-18 18:06:49 +00:00
parent 721dc351b8
commit 607c7f12d6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=79244
2 changed files with 21 additions and 0 deletions

View file

@ -7,6 +7,7 @@
PORTNAME= freetype2 PORTNAME= freetype2
PORTVERSION= 2.1.4 PORTVERSION= 2.1.4
PORTREVISION= 1
CATEGORIES= print CATEGORIES= print
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:S,%SUBDIR%,freetype,} \ MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:S,%SUBDIR%,freetype,} \
http://sunsite.cnlab-switch.ch/ftp/mirror/freetype/%SUBDIR%/ \ http://sunsite.cnlab-switch.ch/ftp/mirror/freetype/%SUBDIR%/ \

View file

@ -0,0 +1,20 @@
--- src/base/ftbdf.c.orig Thu Apr 17 15:06:41 2003
+++ src/base/ftbdf.c Thu Apr 17 15:07:16 2003
@@ -85,10 +85,13 @@
FT_Driver driver = face->driver;
BDF_GetPropertyFunc func;
- func = (BDF_GetPropertyFunc) driver->root.clazz->get_interface(
- FT_MODULE( driver ), "get_bdf_property" );
- if ( func )
- error = func( face, prop_name, aproperty );
+ if (driver->root.clazz->get_interface)
+ {
+ func = (BDF_GetPropertyFunc) driver->root.clazz->get_interface(
+ FT_MODULE( driver ), "get_bdf_property" );
+ if ( func )
+ error = func( face, prop_name, aproperty );
+ }
}
return error;
}