Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1882)

Unified Diff: Source/platform/transforms/TransformationMatrix.cpp

Issue 352793004: Fix use-of-uninitialized-value in TransformationMatrix::blend() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/platform/transforms/TransformationMatrixTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/transforms/TransformationMatrix.cpp
diff --git a/Source/platform/transforms/TransformationMatrix.cpp b/Source/platform/transforms/TransformationMatrix.cpp
index 4403d3e7ec91180ff8865f15023b1a11d25ce89b..172d0bf4a96dd446b977526b8fdf537aee7eaa21 100644
--- a/Source/platform/transforms/TransformationMatrix.cpp
+++ b/Source/platform/transforms/TransformationMatrix.cpp
@@ -1364,8 +1364,11 @@ void TransformationMatrix::blend(const TransformationMatrix& from, double progre
// decompose
DecomposedType fromDecomp;
DecomposedType toDecomp;
- from.decompose(fromDecomp);
- decompose(toDecomp);
+ if (!from.decompose(fromDecomp) || !decompose(toDecomp)) {
+ if (progress < 0.5)
+ *this = from;
+ return;
+ }
// interpolate
blendFloat(fromDecomp.scaleX, toDecomp.scaleX, progress);
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/platform/transforms/TransformationMatrixTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698