From fd5557c45975bbab293c1c3793f52672db3a93bb Mon Sep 17 00:00:00 2001 From: "minho.sun" Date: Wed, 18 May 2016 11:05:50 +0900 Subject: [PATCH] Revert "[3.0] Prevention of Null pointer dereference" This reverts commit 3e619233d3b176575e823c7499764b8dd041d08e. Change-Id: I1de0149fb8fb130d3ec0c400c56cb6ffdfe5d227 --- dali/internal/event/common/object-impl.cpp | 18 +++++++++--------- .../internal/update/rendering/scene-graph-renderer.cpp | 6 +----- 2 files changed, 10 insertions(+), 14 deletions(-) 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 d1ca2e6..ec8965f 100644 --- a/dali/internal/update/rendering/scene-graph-renderer.cpp +++ b/dali/internal/update/rendering/scene-graph-renderer.cpp @@ -191,11 +191,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 ) { -- 2.7.4