diff --git a/src/lib/eldbus/eldbus_introspection.c b/src/lib/eldbus/eldbus_introspection.c index 4338860114..98ea8655d5 100644 --- a/src/lib/eldbus/eldbus_introspection.c +++ b/src/lib/eldbus/eldbus_introspection.c @@ -31,12 +31,14 @@ eldbus_introspection_parse(const char *xml) Eldbus_Introspection_Node *node; Eina_Simple_XML_Node_Root *xml_root; Eina_Simple_XML_Node *xml_node; + Eina_Inlist *last = NULL; EINA_SAFETY_ON_NULL_RETURN_VAL(xml, NULL); node = NULL; xml_root = eina_simple_xml_node_load(xml, strlen(xml), EINA_TRUE); - xml_node = (Eina_Simple_XML_Node*)eina_inlist_last(xml_root->children); + if (xml_root && xml_root->children) last = xml_root->children->last; + xml_node = (Eina_Simple_XML_Node *)last; EINA_SAFETY_ON_FALSE_GOTO(EINA_SIMPLE_XML_NODE_TAG == xml_node->type, free_root); node = (Eldbus_Introspection_Node*)_eldbus_introspection_parse_node((Eina_Simple_XML_Node_Tag*)xml_node); diff --git a/src/lib/evas/filters/evas_filter_parser.c b/src/lib/evas/filters/evas_filter_parser.c index 08b91e5255..00b231e020 100644 --- a/src/lib/evas/filters/evas_filter_parser.c +++ b/src/lib/evas/filters/evas_filter_parser.c @@ -1394,6 +1394,7 @@ static Eina_Bool _curve_instruction_prepare(Evas_Filter_Program *pgm, Evas_Filter_Instruction *instr) { Instruction_Param *param; + Eina_Inlist *last = NULL; EINA_SAFETY_ON_NULL_RETURN_VAL(instr, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(instr->name, EINA_FALSE); @@ -1404,7 +1405,8 @@ _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); - param = EINA_INLIST_CONTAINER_GET(eina_inlist_last(instr->params), Instruction_Param); + if (instr->params) last = instr->params->last; + param = EINA_INLIST_CONTAINER_GET(last, Instruction_Param); param->allow_any_string = EINA_TRUE; _instruction_param_seq_add(instr, "interpolation", VT_STRING, "linear");