From: JunsuChoi Date: Thu, 17 Jun 2021 03:04:12 +0000 (+0900) Subject: common Scene: return FailedAllocation if it really failed at memory allocation. X-Git-Tag: accepted/tizen/unified/20210628.031610~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8eecf899ccb5c1d00c69c77ec8719dfdc2b49989;p=platform%2Fcore%2Fgraphics%2Ftizenvg.git common Scene: return FailedAllocation if it really failed at memory allocation. Due to change of f0ecc67, the return type of reserve() is changed to bool, which can return the result for the fail case. --- diff --git a/src/lib/tvgScene.cpp b/src/lib/tvgScene.cpp index 873053b..afe67d1 100644 --- a/src/lib/tvgScene.cpp +++ b/src/lib/tvgScene.cpp @@ -56,7 +56,7 @@ Result Scene::push(unique_ptr paint) noexcept Result Scene::reserve(uint32_t size) noexcept { - pImpl->paints.reserve(size); + if (!pImpl->paints.reserve(size)) return Result::FailedAllocation; return Result::Success; }