Merge "Updates after RenderableActor removal" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / default-controls / solid-color-actor.cpp
index 1474151..5bf8561 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -46,6 +46,11 @@ ImageActor CreateSolidColorActor( const Vector4& color, bool border, const Vecto
 
   // Create the image
   PixelBuffer* pixbuf = imageData.GetBuffer();
+  if( !pixbuf )
+  {
+    return image;
+  }
+
   Vector4 outerColor = color;
   if ( border )
   {
@@ -83,7 +88,6 @@ ImageActor CreateSolidColorActor( const Vector4& color, bool border, const Vecto
 
   imageData.Update();
   image = ImageActor::New( imageData );
-  image.SetAnchorPoint( AnchorPoint::CENTER );
   image.SetParentOrigin( ParentOrigin::CENTER );
 
   if( border )