From 53f9bab9fed644838c81213143bf6983c2dfc0c1 Mon Sep 17 00:00:00 2001 From: suhyung Eom Date: Wed, 9 Mar 2016 12:16:44 +0900 Subject: [PATCH] Fixed Svace defect [Defect - DEREF_AFTER_NULL, FALL_THROUGH] Signed-off-by: suhyung Eom Change-Id: I9a877f7c9d815457e2d4e8998deefa46e5f22ac2 --- dali/internal/event/actors/actor-impl.cpp | 1 + dali/internal/event/rendering/material-impl.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dali/internal/event/actors/actor-impl.cpp b/dali/internal/event/actors/actor-impl.cpp index 8982e29..932c872 100644 --- a/dali/internal/event/actors/actor-impl.cpp +++ b/dali/internal/event/actors/actor-impl.cpp @@ -4035,6 +4035,7 @@ Vector2 Actor::ApplySizeSetPolicy( const Vector2 size ) return size; } } + break; } default: diff --git a/dali/internal/event/rendering/material-impl.cpp b/dali/internal/event/rendering/material-impl.cpp index abac5a4..1fcfb29 100644 --- a/dali/internal/event/rendering/material-impl.cpp +++ b/dali/internal/event/rendering/material-impl.cpp @@ -112,7 +112,10 @@ void Material::SetTextureImage( size_t index, Image* image ) } } - mTextures[index].mImage.Reset(image); + if( image ) + { + mTextures[index].mImage.Reset(image); + } SceneGraph::SetTextureImageMessage( GetEventThreadServices(), *mSceneObject, index, mTextures[index].mImage.Get()->GetResourceId() ); } } -- 2.7.4