svgicons: Prevent a crash in case of a problem with the SVG image.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
feat/tdehtml+svg
Slávek Banko 3 years ago
parent beb97c2190
commit 4df3893c30
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -217,6 +217,10 @@ public:
return;
ArtRender *render = art_render_new(0, 0, m_width, m_height, m_buffer, m_rowstride, 3, 8, ART_ALPHA_SEPARATE, 0);
if(!render)
{
return;
}
art_render_svp(render, svp);
art_render_mask_solid(render, (opacity << 8) + opacity + (opacity >> 7));
@ -475,6 +479,10 @@ public:
linear->c = -(x1n * linear->a + y1n * linear->b);
ArtRender *render = art_render_new(0, 0, m_width, m_height, m_buffer, m_rowstride, 3, 8, ART_ALPHA_SEPARATE, 0);
if(!render)
{
return;
}
art_render_svp(render, svp);
art_render_gradient_linear(render, linear, ART_FILTER_HYPER);
@ -546,6 +554,10 @@ public:
art_affine_invert(radial->affine, aff1);
ArtRender *render = art_render_new(0, 0, m_width, m_height, m_buffer, m_rowstride, 3, 8, ART_ALPHA_SEPARATE, 0);
if(!render)
{
render;
}
art_render_svp(render, svp);
art_render_gradient_radial(render, radial, ART_FILTER_HYPER);

Loading…
Cancel
Save