common Shape: Fix check to invalid argument

add cmds null check
This commit is contained in:
JunsuChoi 2021-08-05 14:36:40 +09:00 committed by Hermet Park
parent e12161d04f
commit cc81f8ef99

View file

@ -86,7 +86,7 @@ uint32_t Shape::pathCoords(const Point** pts) const noexcept
Result Shape::appendPath(const PathCommand *cmds, uint32_t cmdCnt, const Point* pts, uint32_t ptsCnt) noexcept
{
if (cmdCnt == 0 || ptsCnt == 0 || !pts || !ptsCnt) return Result::InvalidArguments;
if (cmdCnt == 0 || ptsCnt == 0 || !cmds || !pts) return Result::InvalidArguments;
pImpl->path.grow(cmdCnt, ptsCnt);
pImpl->path.append(cmds, cmdCnt, pts, ptsCnt);