renderer: hotfix a nullptr memory copy

This commit is contained in:
Hermet Park 2025-01-30 21:10:40 +09:00 committed by Hermet Park
parent 6a7e6966c3
commit 746ca7f58b

View file

@ -47,7 +47,7 @@ struct Fill::Impl
cnt = dup->cnt;
spread = dup->spread;
colorStops = static_cast<ColorStop*>(malloc(sizeof(ColorStop) * dup->cnt));
memcpy(colorStops, dup->colorStops, sizeof(ColorStop) * dup->cnt);
if (dup->cnt > 0) memcpy(colorStops, dup->colorStops, sizeof(ColorStop) * dup->cnt);
transform = dup->transform;
}