mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-14 12:04:29 +00:00
common Shape: Fix check to invalid argument
add cmds null check
This commit is contained in:
parent
e12161d04f
commit
cc81f8ef99
1 changed files with 1 additions and 1 deletions
|
@ -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
|
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.grow(cmdCnt, ptsCnt);
|
||||||
pImpl->path.append(cmds, cmdCnt, pts, ptsCnt);
|
pImpl->path.append(cmds, cmdCnt, pts, ptsCnt);
|
||||||
|
|
Loading…
Add table
Reference in a new issue