mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-28 00:57:09 +00:00
common shape: fix memory access violation
asan report: ../src/lib/tvgShapeImpl.h:94:15: runtime error: null pointer passed as argument 2, which is declared to never be null ../src/lib/tvgShapeImpl.h:101:15: runtime error: null pointer passed as argument 2, which is declared to never be null
This commit is contained in:
parent
823cc85238
commit
e90f040208
1 changed files with 2 additions and 0 deletions
|
@ -84,6 +84,8 @@ struct ShapePath
|
|||
|
||||
void duplicate(const ShapePath* src)
|
||||
{
|
||||
if (src->cmdCnt == 0 || src->ptsCnt == 0) return;
|
||||
|
||||
cmdCnt = src->cmdCnt;
|
||||
reservedCmdCnt = src->reservedCmdCnt;
|
||||
ptsCnt = src->ptsCnt;
|
||||
|
|
Loading…
Add table
Reference in a new issue