test_progressbar: Verify incoming data object at the beginning
authorStefan Schmidt <s.schmidt@samsung.com>
Tue, 17 Jun 2014 09:23:34 +0000 (11:23 +0200)
committerStefan Schmidt <s.schmidt@samsung.com>
Tue, 17 Jun 2014 09:25:46 +0000 (11:25 +0200)
Align with how pd is checked for in other functions here. No need to
check before free() as it is done internally anyway.

CID: 1216621

src/bin/test_progressbar.c

index 2089db1..cb8cdea 100644 (file)
@@ -81,9 +81,10 @@ static void
 _progressbar_destroy_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
 {
    Progressbar_Data *pd = data;
+   if (!pd) return;
 
    if (pd->timer) ecore_timer_del(pd->timer);
-   if (pd) free(pd);
+   free(pd);
    my_progressbar_test_stop(NULL, NULL, NULL);
    evas_object_del(obj);
 }