Revert "Revert TextVisual in TextLabel Patches"
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / text / text-visual.cpp
index 2968f07..c90c727 100644 (file)
@@ -82,7 +82,11 @@ std::string GetHorizontalAlignment( Toolkit::Text::Layout::HorizontalAlignment a
                                                                                                 HORIZONTAL_ALIGNMENT_STRING_TABLE,
                                                                                                 HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT );
 
-  return std::string( name );
+  if( name )
+  {
+    return std::string( name );
+  }
+  return std::string();
 }
 
 std::string GetVerticalAlignment( Toolkit::Text::Layout::VerticalAlignment alignment )
@@ -91,7 +95,11 @@ std::string GetVerticalAlignment( Toolkit::Text::Layout::VerticalAlignment align
                                                                                                 VERTICAL_ALIGNMENT_STRING_TABLE,
                                                                                                 VERTICAL_ALIGNMENT_STRING_TABLE_COUNT );
 
-  return std::string( name );
+  if( name )
+  {
+    return std::string( name );
+  }
+  return std::string();
 }
 
 const char* VERTEX_SHADER = DALI_COMPOSE_SHADER(