[Tizen] Add early return condition when there is no fontconfig handle 90/320090/1 accepted/tizen/9.0/unified/20250224.171731
authorBowon Ryu <bowon.ryu@samsung.com>
Thu, 20 Feb 2025 06:13:13 +0000 (15:13 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Mon, 24 Feb 2025 04:23:58 +0000 (13:23 +0900)
Change-Id: I4270e9d08185dc5e4c0016bb6b9d5d46f43cbcb5
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
dali/internal/text/text-abstraction/plugin/font-client-plugin-impl.cpp

index 7652d5063ba85574e50cfef638a966546feaf180..c006443591ea4652780a9a9d18ddb3ab3c6a6f39 100644 (file)
@@ -1068,6 +1068,10 @@ FontDescription::Type FontClient::Plugin::GetFontType(FontId fontId) const
 bool FontClient::Plugin::AddCustomFontDirectory(const FontPath& path)
 {
   mCacheHandler->mCustomFontDirectories.push_back(path);
+  if(!mCacheHandler->mFontConfig)
+  {
+    return false;
+  }
   return FcConfigAppFontAddDir(mCacheHandler->mFontConfig, reinterpret_cast<const FcChar8*>(path.c_str()));
 }