From: suhyung Eom Date: Tue, 31 May 2016 01:38:04 +0000 (+0900) Subject: Revert "[3.0] Prevention of Null pointer dereference" X-Git-Tag: accepted/tizen/common/20160613.144854~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6f6bc32299dddea54eebd3db52dbfe29d96e3216;p=platform%2Fcore%2Fuifw%2Fdali-core.git Revert "[3.0] Prevention of Null pointer dereference" This reverts commit 771949783e6f48532fb86c96416a74de4cb14d0c. Change-Id: Idf62fcf1ec4faaaaa97e7ae760409c1187438f55 --- diff --git a/dali/internal/event/common/object-impl.cpp b/dali/internal/event/common/object-impl.cpp index 3e8cc80..7013a10 100644 --- a/dali/internal/event/common/object-impl.cpp +++ b/dali/internal/event/common/object-impl.cpp @@ -824,7 +824,7 @@ Property::Value Object::GetPropertyValue( const PropertyMetadata* entry ) const { case Property::BOOLEAN: { - const AnimatableProperty* property = static_cast< const AnimatableProperty* >( entry->GetSceneGraphProperty() ); + const AnimatableProperty* property = dynamic_cast< const AnimatableProperty* >( entry->GetSceneGraphProperty() ); DALI_ASSERT_DEBUG( NULL != property ); value = (*property)[ bufferIndex ]; @@ -833,7 +833,7 @@ Property::Value Object::GetPropertyValue( const PropertyMetadata* entry ) const case Property::INTEGER: { - const AnimatableProperty* property = static_cast< const AnimatableProperty* >( entry->GetSceneGraphProperty() ); + const AnimatableProperty* property = dynamic_cast< const AnimatableProperty* >( entry->GetSceneGraphProperty() ); DALI_ASSERT_DEBUG( NULL != property ); value = (*property)[ bufferIndex ]; @@ -842,7 +842,7 @@ Property::Value Object::GetPropertyValue( const PropertyMetadata* entry ) const case Property::FLOAT: { - const AnimatableProperty* property = static_cast< const AnimatableProperty* >( entry->GetSceneGraphProperty() ); + const AnimatableProperty* property = dynamic_cast< const AnimatableProperty* >( entry->GetSceneGraphProperty() ); DALI_ASSERT_DEBUG( NULL != property ); value = (*property)[ bufferIndex ]; @@ -851,7 +851,7 @@ Property::Value Object::GetPropertyValue( const PropertyMetadata* entry ) const case Property::VECTOR2: { - const AnimatableProperty* property = static_cast< const AnimatableProperty* >( entry->GetSceneGraphProperty() ); + const AnimatableProperty* property = dynamic_cast< const AnimatableProperty* >( entry->GetSceneGraphProperty() ); DALI_ASSERT_DEBUG( NULL != property ); if(entry->componentIndex == 0) @@ -871,7 +871,7 @@ Property::Value Object::GetPropertyValue( const PropertyMetadata* entry ) const case Property::VECTOR3: { - const AnimatableProperty* property = static_cast< const AnimatableProperty* >( entry->GetSceneGraphProperty() ); + const AnimatableProperty* property = dynamic_cast< const AnimatableProperty* >( entry->GetSceneGraphProperty() ); DALI_ASSERT_DEBUG( NULL != property ); if(entry->componentIndex == 0) @@ -895,7 +895,7 @@ Property::Value Object::GetPropertyValue( const PropertyMetadata* entry ) const case Property::VECTOR4: { - const AnimatableProperty* property = static_cast< const AnimatableProperty* >( entry->GetSceneGraphProperty() ); + const AnimatableProperty* property = dynamic_cast< const AnimatableProperty* >( entry->GetSceneGraphProperty() ); DALI_ASSERT_DEBUG( NULL != property ); if(entry->componentIndex == 0) @@ -923,7 +923,7 @@ Property::Value Object::GetPropertyValue( const PropertyMetadata* entry ) const case Property::MATRIX: { - const AnimatableProperty* property = static_cast< const AnimatableProperty* >( entry->GetSceneGraphProperty() ); + const AnimatableProperty* property = dynamic_cast< const AnimatableProperty* >( entry->GetSceneGraphProperty() ); DALI_ASSERT_DEBUG( NULL != property ); value = (*property)[ bufferIndex ]; @@ -932,7 +932,7 @@ Property::Value Object::GetPropertyValue( const PropertyMetadata* entry ) const case Property::MATRIX3: { - const AnimatableProperty* property = static_cast< const AnimatableProperty* >( entry->GetSceneGraphProperty() ); + const AnimatableProperty* property = dynamic_cast< const AnimatableProperty* >( entry->GetSceneGraphProperty() ); DALI_ASSERT_DEBUG( NULL != property ); value = (*property)[ bufferIndex ]; @@ -941,7 +941,7 @@ Property::Value Object::GetPropertyValue( const PropertyMetadata* entry ) const case Property::ROTATION: { - const AnimatableProperty* property = static_cast< const AnimatableProperty* >( entry->GetSceneGraphProperty() ); + const AnimatableProperty* property = dynamic_cast< const AnimatableProperty* >( entry->GetSceneGraphProperty() ); DALI_ASSERT_DEBUG( NULL != property ); value = (*property)[ bufferIndex ]; diff --git a/dali/internal/update/rendering/scene-graph-renderer.cpp b/dali/internal/update/rendering/scene-graph-renderer.cpp index df622e7..f004cc8 100644 --- a/dali/internal/update/rendering/scene-graph-renderer.cpp +++ b/dali/internal/update/rendering/scene-graph-renderer.cpp @@ -196,11 +196,7 @@ void Renderer::PrepareRender( BufferIndex updateBufferIndex ) const UniformMap& rendererUniformMap = PropertyOwner::GetUniformMap(); AddMappings( localMap, rendererUniformMap ); - - if( mShader ) - { - AddMappings( localMap, mShader->GetUniformMap() ); - } + AddMappings( localMap, mShader->GetUniformMap() ); } else if( mRegenerateUniformMap == COPY_UNIFORM_MAP ) {