[Tizen] Check for NULL return value of FcPatternCreate() 49/128249/1
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 8 May 2017 07:42:22 +0000 (16:42 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 8 May 2017 07:48:41 +0000 (16:48 +0900)
Change-Id: I7148c301a8aef83d4c730b7a1d882eade54579da
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
text/dali/internal/text-abstraction/font-client-plugin-impl.cpp

index 68399fc..dc09c0e 100644 (file)
@@ -1107,6 +1107,11 @@ FcPattern* FontClient::Plugin::CreateFontFamilyPattern( const FontDescription& f
   // a pattern holds a set of names, each name refers to a property of the font
   FcPattern* fontFamilyPattern = FcPatternCreate();
 
+  if( !fontFamilyPattern )
+  {
+    return NULL;
+  }
+
   // add a property to the pattern for the font family
   FcPatternAddString( fontFamilyPattern, FC_FAMILY, reinterpret_cast<const FcChar8*>( fontDescription.family.c_str() ) );