Improve error handling

This commit is contained in:
Pierre Pronchery 2017-11-07 01:41:45 +01:00
parent 92dcb1d05a
commit 9038eca02c

View File

@ -290,7 +290,10 @@ static Tasks * _tasks_init(PanelAppletHelper * helper, GtkWidget ** widget)
GtkOrientation orientation; GtkOrientation orientation;
if((tasks = malloc(sizeof(*tasks))) == NULL) if((tasks = malloc(sizeof(*tasks))) == NULL)
{
error_set("%s: %s", applet.name, strerror(errno));
return NULL; return NULL;
}
tasks->helper = helper; tasks->helper = helper;
tasks->tasks = NULL; tasks->tasks = NULL;
tasks->tasks_cnt = 0; tasks->tasks_cnt = 0;