Add early return condition when there is no fontconfig handle 46/319946/1
authorBowon Ryu <bowon.ryu@samsung.com>
Thu, 20 Feb 2025 06:13:13 +0000 (15:13 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Thu, 20 Feb 2025 06:13:13 +0000 (15:13 +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 9952f788187c9bd7a832735d6e3e75f9e4206247..cedf893bfef01e27cb43510e7adafdd0c03caf20 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()));
 }