mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-11 07:02:31 +00:00
commong shape: --sanitizer report
null pointer passed as argument 2, which is declared to never be null
This commit is contained in:
parent
c9a083abce
commit
26128807e1
1 changed files with 5 additions and 4 deletions
|
@ -48,10 +48,11 @@ struct ShapeStroke
|
||||||
join(src->join)
|
join(src->join)
|
||||||
{
|
{
|
||||||
memcpy(color, src->color, sizeof(color));
|
memcpy(color, src->color, sizeof(color));
|
||||||
dashPattern = static_cast<float*>(malloc(sizeof(float) * dashCnt));
|
if (dashCnt > 0) {
|
||||||
memcpy(dashPattern, src->dashPattern, sizeof(float) * dashCnt);
|
dashPattern = static_cast<float*>(malloc(sizeof(float) * dashCnt));
|
||||||
if (src->fill)
|
memcpy(dashPattern, src->dashPattern, sizeof(float) * dashCnt);
|
||||||
fill = src->fill->duplicate();
|
}
|
||||||
|
if (src->fill) fill = src->fill->duplicate();
|
||||||
}
|
}
|
||||||
|
|
||||||
~ShapeStroke()
|
~ShapeStroke()
|
||||||
|
|
Loading…
Add table
Reference in a new issue