[pango] [coretext] NULL check in ct_font_descriptor_get_weight()
- From: Cody Russell <bratsche src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango] [coretext] NULL check in ct_font_descriptor_get_weight()
- Date: Sun, 28 Sep 2014 20:51:13 +0000 (UTC)
commit c2a40e3b35a37f76f353655d9220dd94156fb89c
Author: Cody Russell <cody jhu edu>
Date: Sun Sep 28 15:47:46 2014 -0500
[coretext] NULL check in ct_font_descriptor_get_weight()
Ensure that CFDictionaryGetValue() didn't return NULL before we
call CFNumberGetValue().
https://bugzilla.gnome.org/show_bug.cgi?id=736697
pango/pangocoretext-fontmap.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/pango/pangocoretext-fontmap.c b/pango/pangocoretext-fontmap.c
index 6044773..9656fb8 100644
--- a/pango/pangocoretext-fontmap.c
+++ b/pango/pangocoretext-fontmap.c
@@ -298,7 +298,7 @@ ct_font_descriptor_get_weight (CTFontDescriptorRef desc)
cf_number = (CFNumberRef)CFDictionaryGetValue (dict,
kCTFontWeightTrait);
- if (CFNumberGetValue (cf_number, kCFNumberCGFloatType, &value))
+ if (cf_number != NULL && CFNumberGetValue (cf_number, kCFNumberCGFloatType, &value))
{
if (value < ct_weight_min || value > ct_weight_max)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]