diff --git a/src/lottie/lottiemodel.h b/src/lottie/lottiemodel.h index 7f95c7fc..977e808b 100644 --- a/src/lottie/lottiemodel.h +++ b/src/lottie/lottiemodel.h @@ -111,6 +111,11 @@ struct PathData { VPath &result) { result.reset(); + // test for empty animation data. + if (start.mPoints.empty() || end.mPoints.empty()) + { + return; + } auto size = std::min(start.mPoints.size(), end.mPoints.size()); /* reserve exact memory requirement at once * ptSize = size + 1(size + close)