aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/skottie/src/SkottieAdapter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/skottie/src/SkottieAdapter.cpp')
-rw-r--r--modules/skottie/src/SkottieAdapter.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/skottie/src/SkottieAdapter.cpp b/modules/skottie/src/SkottieAdapter.cpp
index 615390e0b2..f4bb0a8fbb 100644
--- a/modules/skottie/src/SkottieAdapter.cpp
+++ b/modules/skottie/src/SkottieAdapter.cpp
@@ -94,7 +94,10 @@ void GradientAdapter::apply() {
// |fColorStops| holds |fStopCount| x [ pos, r, g, g ] + ? x [ pos, alpha ]
if (fColorStops.size() < fStopCount * 4 || ((fColorStops.size() - fStopCount * 4) % 2)) {
- SkDebugf("!! Invalid gradient stop array size: %zu", fColorStops.size());
+ // apply() may get called before the stops are set, so only log when we have some stops.
+ if (!fColorStops.empty()) {
+ SkDebugf("!! Invalid gradient stop array size: %zu\n", fColorStops.size());
+ }
return;
}