Fix compile error. Non initialized variable.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / scrollable / scroll-view / scroll-view-page-path-effect-impl.cpp
index f12b873..5d2c91b 100644 (file)
@@ -33,8 +33,8 @@ namespace Toolkit
 namespace Internal
 {
 
-ScrollViewPagePathEffect::ScrollViewPagePathEffect(Path path, const Vector3& forward, Dali::Property::Index inputPropertyIndex, const Vector3& pageSize, unsigned int pageCount)
-:mPageSize(pageSize),
+ScrollViewPagePathEffect::ScrollViewPagePathEffect(Path path, const Vector3& forward, Dali::Property::Index inputPropertyIndex, const Vector3& viewPageSize, unsigned int pageCount)
+:mPageSize(viewPageSize),
  mInputPropertyIndex(inputPropertyIndex),
  mPageCount(pageCount)
 {
@@ -51,9 +51,13 @@ ScrollViewPagePathEffect::ScrollViewPagePathEffect(Path path, const Vector3& for
   //Create linear constrainer
   pointsProperty = Property::Value(Property::ARRAY);
   Property::Array* array = pointsProperty.GetArray();
-  array->PushBack(0.0f);
-  array->PushBack(1.0f);
-  array->PushBack(0.0f);
+
+  if( array )
+  {
+    array->PushBack(0.0f);
+    array->PushBack(1.0f);
+    array->PushBack(0.0f);
+  }
   mLinearConstrainer = Dali::LinearConstrainer::New();
   mLinearConstrainer.SetProperty( LinearConstrainer::Property::VALUE, pointsProperty );
 }