From: Francisco Santos Date: Wed, 30 Aug 2017 10:40:15 +0000 (+0100) Subject: Fix potentially uninitialized variable. X-Git-Tag: dali_1.2.56~5^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F75%2F146775%2F2;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git Fix potentially uninitialized variable. Change-Id: I75f6d47bd86111675d1cf2e772cf034b15ee6ae9 --- diff --git a/dali-toolkit/internal/visuals/animated-image/animated-image-visual.cpp b/dali-toolkit/internal/visuals/animated-image/animated-image-visual.cpp index be736e1..7c933ce 100644 --- a/dali-toolkit/internal/visuals/animated-image/animated-image-visual.cpp +++ b/dali-toolkit/internal/visuals/animated-image/animated-image-visual.cpp @@ -266,15 +266,26 @@ void AnimatedImageVisual::DoSetProperty( Property::Index index, case Toolkit::ImageVisual::Property::WRAP_MODE_U: { int wrapMode; - Scripting::GetEnumerationProperty( value, WRAP_MODE_TABLE, WRAP_MODE_TABLE_COUNT, wrapMode ); - mWrapModeU = Dali::WrapMode::Type( wrapMode ); - break; + if(Scripting::GetEnumerationProperty( value, WRAP_MODE_TABLE, WRAP_MODE_TABLE_COUNT, wrapMode )) + { + mWrapModeU = Dali::WrapMode::Type(wrapMode); + } + else + { + mWrapModeU = Dali::WrapMode::Type::DEFAULT; + } } case Toolkit::ImageVisual::Property::WRAP_MODE_V: { int wrapMode; - Scripting::GetEnumerationProperty( value, WRAP_MODE_TABLE, WRAP_MODE_TABLE_COUNT, wrapMode ); - mWrapModeV = Dali::WrapMode::Type( wrapMode ); + if(Scripting::GetEnumerationProperty( value, WRAP_MODE_TABLE, WRAP_MODE_TABLE_COUNT, wrapMode )) + { + mWrapModeV = Dali::WrapMode::Type(wrapMode); + } + else + { + mWrapModeV = Dali::WrapMode::Type::DEFAULT; + } break; }