Fixed prevent defects
[platform/core/uifw/dali-core.git] / dali / internal / event / render-tasks / render-task-impl.cpp
index eea053c..926354f 100644 (file)
@@ -18,6 +18,9 @@
 // CLASS HEADER
 #include <dali/internal/event/render-tasks/render-task-impl.h>
 
+// EXTERNAL INCLUDES
+#include <cstring> // for strcmp
+
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/object/type-registry.h>
@@ -221,10 +224,14 @@ void RenderTask::GetViewport( Viewport& viewPort ) const
     }
     else
     {
-      Vector2 size( Stage::GetCurrent()->GetSize() );
-      viewPort.x = viewPort.y = 0;
-      viewPort.width = size.width;
-      viewPort.height = size.height;
+      Internal::Stage* stage = Internal::Stage::GetCurrent();
+      if ( stage )
+      {
+        Vector2 size( stage->GetSize() );
+        viewPort.x = viewPort.y = 0;
+        viewPort.width = size.width;
+        viewPort.height = size.height;
+      }
     }
   }
   else
@@ -450,11 +457,11 @@ unsigned int RenderTask::GetDefaultPropertyCount() const
 
 void RenderTask::GetDefaultPropertyIndices( Property::IndexContainer& indices ) const
 {
-  indices.reserve( DEFAULT_PROPERTY_COUNT );
+  indices.Reserve( DEFAULT_PROPERTY_COUNT );
 
   for ( int i = 0; i < DEFAULT_PROPERTY_COUNT; ++i )
   {
-    indices.push_back( i );
+    indices.PushBack( i );
   }
 }