aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/SampleSGInval.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/samplecode/SampleSGInval.cpp b/samplecode/SampleSGInval.cpp
index 08bfd64377..44cdcb91d9 100644
--- a/samplecode/SampleSGInval.cpp
+++ b/samplecode/SampleSGInval.cpp
@@ -62,6 +62,10 @@ protected:
}
bool onAnimate(const SkAnimTimer& timer) override {
+ if (!fRoot) {
+ return true;
+ }
+
static constexpr SkScalar kSize = 50;
static constexpr SkScalar kRate = 1.0f / 500;
const auto t = timer.msec() * kRate;