Open hor-net opened 6 years ago
I've just merged into my local copy and found that it crashes at least on one file trying to access shape->fill.gradient->nstops when shape->fill.gradient is NULL. The file that makes it crash is at https://sourceforge.net/p/tuxpaint/tuxpaint-stamps/ci/master/tree/stamps/clothes/bikini.svg Maybe start with an else so the code doesn't gets called unconditionally?
else
for (int i = 0; i < shape->fill.gradient->nstops; i++) {
unsigned int alpha = (shape->fill.gradient->stops[i].color >> 24) * attr->fillOpacity;
shape->fill.gradient->stops[i].color &=0x00FFFFFF;
shape->fill.gradient->stops[i].color |= alpha << 24;
}
Could we get a review on this?