From: Heeyong Song Date: Wed, 26 Aug 2015 07:53:01 +0000 (+0900) Subject: Fix VD prevent issues - DIVIDE_BY_ZERO X-Git-Tag: dali_1.1.2~10^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F01%2F46801%2F1;p=platform%2Fcore%2Fuifw%2Fdali-core.git Fix VD prevent issues - DIVIDE_BY_ZERO Change-Id: Iceb219087a98082fa36e40a4f1701b17c7105c57 --- diff --git a/dali/internal/event/animation/path-impl.cpp b/dali/internal/event/animation/path-impl.cpp index 540bc29..ad1c796 100644 --- a/dali/internal/event/animation/path-impl.cpp +++ b/dali/internal/event/animation/path-impl.cpp @@ -308,7 +308,7 @@ void Path::FindSegmentAndProgress( float t, unsigned int& segment, float& tLocal //Find segment and local progress unsigned int numSegs = GetNumberOfSegments(); - if( t <= 0.0f ) + if( t <= 0.0f || numSegs == 0 ) { segment = 0; tLocal = 0.0f; diff --git a/dali/internal/event/common/property-buffer-impl.cpp b/dali/internal/event/common/property-buffer-impl.cpp index 7fa13f7..384e136 100644 --- a/dali/internal/event/common/property-buffer-impl.cpp +++ b/dali/internal/event/common/property-buffer-impl.cpp @@ -88,7 +88,7 @@ unsigned int GetPropertyImplementationAlignment( Property::Type& propertyType ) case Property::ARRAY: case Property::MAP: { - DALI_ASSERT_ALWAYS( "No size for properties with no type, or dynamic sizes" ); + DALI_ASSERT_ALWAYS( false && "No size for properties with no type, or dynamic sizes" ); break; } case Property::BOOLEAN: @@ -446,10 +446,13 @@ void PropertyBuffer::FormatChanged() } // Check the alignment for the maxAlignment required to calculate the size of the format - if( unsigned int offset = currentAlignment % maxAlignmentRequired ) + if( maxAlignmentRequired != 0 ) { - // Not compatible, realign - currentAlignment = currentAlignment + maxAlignmentRequired - offset; + if( unsigned int offset = currentAlignment % maxAlignmentRequired ) + { + // Not compatible, realign + currentAlignment = currentAlignment + maxAlignmentRequired - offset; + } } // Set the format size