bug 580719 - pt2 - [harfbuzz] check face validity before using ot_layout in hb-ot-layout.cc. r=jdaggett a=blocking2.0

This commit is contained in:
Jonathan Kew 2010-08-17 15:49:40 +01:00
Родитель 43a3ed4892
Коммит 1b93eed2a6
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -74,19 +74,19 @@ _hb_ot_layout_free (hb_ot_layout_t *layout)
static const GDEF&
_get_gdef (hb_face_t *face)
{
return likely (face->ot_layout->gdef) ? *face->ot_layout->gdef : Null(GDEF);
return likely (face->ot_layout && face->ot_layout->gdef) ? *face->ot_layout->gdef : Null(GDEF);
}
static const GSUB&
_get_gsub (hb_face_t *face)
{
return likely (face->ot_layout->gsub) ? *face->ot_layout->gsub : Null(GSUB);
return likely (face->ot_layout && face->ot_layout->gsub) ? *face->ot_layout->gsub : Null(GSUB);
}
static const GPOS&
_get_gpos (hb_face_t *face)
{
return likely (face->ot_layout->gpos) ? *face->ot_layout->gpos : Null(GPOS);
return likely (face->ot_layout && face->ot_layout->gpos) ? *face->ot_layout->gpos : Null(GPOS);
}