diff options
-rw-r--r-- | experimental/skottie/Skottie.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/experimental/skottie/Skottie.cpp b/experimental/skottie/Skottie.cpp index 696f619f83..7a08cec9df 100644 --- a/experimental/skottie/Skottie.cpp +++ b/experimental/skottie/Skottie.cpp @@ -628,9 +628,11 @@ sk_sp<sksg::RenderNode> AttachShape(const Json::Value& jshape, AttachContext* ct case ShapeType::kGeometryEffect: { // Apply the current effect and pop from the stack. SkASSERT(rec->fInfo.fAttacherIndex < SK_ARRAY_COUNT(gGeometryEffectAttachers)); - geos = gGeometryEffectAttachers[rec->fInfo.fAttacherIndex](rec->fJson, - ctx, - std::move(geos)); + if (!geos.empty()) { + geos = gGeometryEffectAttachers[rec->fInfo.fAttacherIndex](rec->fJson, + ctx, + std::move(geos)); + } SkASSERT(geometryEffectStack->back().fJson == rec->fJson); SkASSERT(geometryEffectStack->back().fAttach == |