X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fbuilder%2Fbuilder-set-property.cpp;h=c78e19c1a884ea953e409333487c41f754cabe6d;hp=12f602cb076e19a323a8065c134a53336f549407;hb=3e39b3bd20678fc2aba9618f782a830014f2062a;hpb=6730c857bcd22578d8d625d808a82fc3dd33e50f diff --git a/dali-toolkit/internal/builder/builder-set-property.cpp b/dali-toolkit/internal/builder/builder-set-property.cpp index 12f602c..c78e19c 100644 --- a/dali-toolkit/internal/builder/builder-set-property.cpp +++ b/dali-toolkit/internal/builder/builder-set-property.cpp @@ -343,24 +343,29 @@ bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::V { value = Property::Value(Property::ARRAY); Property::Array* array = value.GetArray(); + unsigned int i = 0; TreeNode::ConstIterator iter(node.CBegin()); - for( ; i < node.Size(); ++i, ++iter) + + if( array ) { - Property::Value childValue; - if( SetPropertyFromNode( (*iter).second, childValue, replacer ) ) + for( ; i < node.Size(); ++i, ++iter) { - array->PushBack( childValue ); + Property::Value childValue; + if( SetPropertyFromNode( (*iter).second, childValue, replacer ) ) + { + array->PushBack( childValue ); + } } - } - if( array->Count() == node.Size() ) - { - done = true; - } - else - { - done = false; + if( array->Count() == node.Size() ) + { + done = true; + } + else + { + done = false; + } } } break; @@ -375,24 +380,29 @@ bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::V { value = Property::Value(Property::MAP); Property::Map* map = value.GetMap(); + unsigned int i = 0; TreeNode::ConstIterator iter(node.CBegin()); - for( ; i < node.Size(); ++i, ++iter) + + if( map ) { - Property::Value childValue; - if( SetPropertyFromNode( (*iter).second, childValue, replacer ) ) + for( ; i < node.Size(); ++i, ++iter) { - map->Insert( (*iter).first, childValue ); + Property::Value childValue; + if( SetPropertyFromNode( (*iter).second, childValue, replacer ) ) + { + map->Insert( (*iter).first, childValue ); + } } - } - if( map->Count() == node.Size() ) - { - done = true; - } - else - { - done = false; + if( map->Count() == node.Size() ) + { + done = true; + } + else + { + done = false; + } } } break; @@ -483,13 +493,16 @@ bool SetPropertyFromNode( const TreeNode& node, Property::Value& value, value = Property::Value(Property::ARRAY); Property::Array* array = value.GetArray(); - for(TreeConstIter iter = node.CBegin(); iter != node.CEnd(); ++iter) + if( array ) { - Property::Value childValue; - if( SetPropertyFromNode( (*iter).second, childValue, replacer ) ) + for(TreeConstIter iter = node.CBegin(); iter != node.CEnd(); ++iter) { - array->PushBack( childValue ); - done = true; + Property::Value childValue; + if( SetPropertyFromNode( (*iter).second, childValue, replacer ) ) + { + array->PushBack( childValue ); + done = true; + } } } } @@ -507,13 +520,17 @@ bool SetPropertyFromNode( const TreeNode& node, Property::Value& value, { value = Property::Value(Property::ARRAY); Property::Array* array = value.GetArray(); - for(unsigned int i = 0; i < node.Size(); ++i, ++iter) + + if( array ) { - Property::Value childValue; - if( SetPropertyFromNode( (*iter).second, childValue, replacer ) ) + for(unsigned int i = 0; i < node.Size(); ++i, ++iter) { - array->PushBack( childValue ); - done = true; + Property::Value childValue; + if( SetPropertyFromNode( (*iter).second, childValue, replacer ) ) + { + array->PushBack( childValue ); + done = true; + } } } } @@ -521,13 +538,17 @@ bool SetPropertyFromNode( const TreeNode& node, Property::Value& value, { value = Property::Value(Property::MAP); Property::Map* map = value.GetMap(); - for(unsigned int i = 0; i < node.Size(); ++i, ++iter) + + if( map ) { - Property::Value childValue; - if( SetPropertyFromNode( (*iter).second, childValue, replacer ) ) + for(unsigned int i = 0; i < node.Size(); ++i, ++iter) { - map->Insert( (*iter).first, childValue ); - done = true; + Property::Value childValue; + if( SetPropertyFromNode( (*iter).second, childValue, replacer ) ) + { + map->Insert( (*iter).first, childValue ); + done = true; + } } } }