From 7633696cb66a6e030b82613a9c20a593e34864f8 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Thu, 13 Oct 2016 12:47:38 -0400 Subject: [PATCH] evas: Fix directly dereferencing pointer which may be NULL Coverity reports this as a dereference before null check which implies that 'pd' May be null here, so let's not use it before we check it. Fixes CID1364114 Signed-off-by: Chris Michael --- src/lib/evas/canvas/evas_filter_mixin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_filter_mixin.c b/src/lib/evas/canvas/evas_filter_mixin.c index 7eb8b14..ba58838 100644 --- a/src/lib/evas/canvas/evas_filter_mixin.c +++ b/src/lib/evas/canvas/evas_filter_mixin.c @@ -355,12 +355,13 @@ EOLIAN static void _efl_canvas_filter_internal_efl_gfx_filter_filter_program_set(Eo *eo_obj, Evas_Filter_Data *pd, const char *code, const char *name) { - Evas_Object_Protected_Data *obj = pd->obj; + Evas_Object_Protected_Data *obj; Evas_Filter_Program *pgm = NULL; Evas_Object_Filter_Data *fcow; Eina_Bool alpha; if (!pd) return; + obj = pd->obj; if (eina_streq(pd->data->code, code) && eina_streq(pd->data->name, name)) return; -- 2.7.4