mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
wg_engine: ++safety
This commit is contained in:
parent
e692a59ff9
commit
af7fb159d1
1 changed files with 2 additions and 1 deletions
|
@ -152,7 +152,8 @@ void WgShaderTypeGradient::update(const RadialGradient* radialGradient)
|
||||||
|
|
||||||
void WgShaderTypeGradient::updateTexData(const Fill::ColorStop* stops, uint32_t stopCnt)
|
void WgShaderTypeGradient::updateTexData(const Fill::ColorStop* stops, uint32_t stopCnt)
|
||||||
{
|
{
|
||||||
assert(stops);
|
if (stopCnt == 0) return;
|
||||||
|
|
||||||
static Array<Fill::ColorStop> sstops(stopCnt);
|
static Array<Fill::ColorStop> sstops(stopCnt);
|
||||||
sstops.clear();
|
sstops.clear();
|
||||||
sstops.push(stops[0]);
|
sstops.push(stops[0]);
|
||||||
|
|
Loading…
Add table
Reference in a new issue