ector: fix null pointer dereference issue
authorVivek Ellur <vivek.ellur@samsung.com>
Fri, 30 Oct 2015 05:39:15 +0000 (06:39 +0100)
committerCedric BAIL <cedric@osg.samsung.com>
Sat, 31 Oct 2015 01:12:06 +0000 (02:12 +0100)
Summary:
Fix Coverity CID1293003

Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>
Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3220

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/ector/software/ector_software_rasterizer.c

index b436eed..0cb74a0 100644 (file)
@@ -50,6 +50,9 @@ _blend_gradient(int count, const SW_FT_Span *spans, void *user_data)
    if (data->type == LinearGradient) fetchfunc = &fetch_linear_gradient;
    if (data->type == RadialGradient) fetchfunc = &fetch_radial_gradient;
 
+   if (!fetchfunc)
+     return;
+
    comp_func = ector_comp_func_span_get(data->op, data->mul_col, data->gradient->alpha);
 
    // move to the offset location