Merge "Fix SVACE issue" into devel/master
authorDavid Steele <david.steele@samsung.com>
Wed, 13 Sep 2017 17:27:33 +0000 (17:27 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Wed, 13 Sep 2017 17:27:34 +0000 (17:27 +0000)
dali-toolkit/internal/visuals/text/text-visual.cpp

index 7ce455e..889b57d 100644 (file)
@@ -74,7 +74,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 )
@@ -83,7 +87,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(