evas_filter_parser: remove dereferenced NULL

Summary:
This is detected by static analysis tool.
The variable last could be NULL when it is dereferenced.

Reviewers: Hermet, zmike, bu5hm4n

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9796
This commit is contained in:
Shinwoo Kim 2019-08-30 09:17:59 -04:00 committed by Mike Blumenkrantz
parent 41a9ce67a9
commit 228bed4c8c
1 changed files with 10 additions and 4 deletions

View File

@ -1405,10 +1405,16 @@ _curve_instruction_prepare(Evas_Filter_Program *pgm, Evas_Filter_Instruction *in
// TODO: Allow passing an array of 256 values as points.
// It could be easily computed from another function in the script.
_instruction_param_seq_add(instr, "points", VT_SPECIAL, _lua_curve_points_func, NULL);
if (instr->params) last = instr->params->last;
param = EINA_INLIST_CONTAINER_GET(last, Instruction_Param);
param->allow_any_string = EINA_TRUE;
if (instr->params)
{
last = instr->params->last;
if (last)
{
param = EINA_INLIST_CONTAINER_GET(last, Instruction_Param);
param->allow_any_string = EINA_TRUE;
}
}
_instruction_param_seq_add(instr, "interpolation", VT_STRING, "linear");
_instruction_param_seq_add(instr, "channel", VT_STRING, "rgb");
_instruction_param_name_add(instr, "src", VT_BUFFER, _buffer_get(pgm, "input"));