From: Hermet Park Date: Mon, 15 Apr 2019 05:18:51 +0000 (+0900) Subject: vector: + exception handling X-Git-Tag: accepted/tizen/unified/20190419.020107^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a2325e8ca443c6309b1e8efd1595336ab962c4c2;p=platform%2Fcore%2Fuifw%2Flottie-player.git vector: + exception handling prevent a case of dividing by zero. Change-Id: I6e99d6b97bda1f395042e2704953e65bb14758aa --- diff --git a/src/vector/vraster.cpp b/src/vector/vraster.cpp index 95c2626..1ad9a8b 100644 --- a/src/vector/vraster.cpp +++ b/src/vector/vraster.cpp @@ -429,7 +429,9 @@ public: if (_q[(i + n) % _count].try_push(std::move(task))) return; } - _q[i % _count].push(std::move(task)); + if (_count > 0) { + _q[i % _count].push(std::move(task)); + } } };