From: Subhransu Mohanty Date: Mon, 25 Jan 2021 01:47:25 +0000 (+0900) Subject: Fix crash when path animation data is empty X-Git-Tag: submit/tizen/20210315.060811~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=892dfaa2e165a950bab853de2ae62a6bac3732b4;p=platform%2Fcore%2Fuifw%2Flottie-player.git Fix crash when path animation data is empty Change-Id: I31c61d053af4dafbf536e5e214cbee4885c26647 --- diff --git a/src/lottie/lottiemodel.h b/src/lottie/lottiemodel.h index 7f95c7f..977e808 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)