ector: Fix Coverity CID1293003

Summary: This fixes an issue of coverity reporting Explicit null
dereference as fetchfunc is defaulted to NULL, yet no check is made
later before calling it.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-04-12 20:51:31 -04:00
parent 3b4902e17e
commit d3d909bf9e
1 changed files with 2 additions and 1 deletions

View File

@ -80,7 +80,8 @@ _blend_gradient(int count, const SW_FT_Span *spans, void *user_data)
while (length)
{
int l = MIN(length, buffer_size);
fetchfunc(buffer, data, spans->y, spans->x, l);
if (fetchfunc)
fetchfunc(buffer, data, spans->y, spans->x, l);
if (data->mul_col == 0xffffffff)
_ector_comp_func_source_over(target, buffer, l, spans->coverage); // TODO use proper composition func
else