diff --git a/pango/pangocoretext-fontmap.c b/pango/pangocoretext-fontmap.c
index bcbb173..53b2676 100644
--- a/pango/pangocoretext-fontmap.c
+++ b/pango/pangocoretext-fontmap.c
@@ -297,7 +297,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)
 	{
