e_prefix_lib_get());
files = ecore_file_ls(dir);
+ if (!files) return NULL;
+
EINA_LIST_FREE(files, file)
{
E_Illume_Layout_Policy *p;
p =
E_OBJECT_ALLOC(E_Illume_Layout_Policy, E_ILLUME_LAYOUT_POLICY_TYPE,
_e_mod_layout_policy_free);
+ if (!p) continue;
p->handle = dlopen(dir, RTLD_NOW | RTLD_GLOBAL);
if (!p->handle)
p = NULL;
continue;
}
+ if (file) free(file);
l = eina_list_append(l, p);
}
/* get all files in this directory */
files = ecore_file_ls(dir);
+ if (!files) return NULL;
/* loop through the files, searching for this policy */
EINA_LIST_FREE(files, file)
policy =
E_OBJECT_ALLOC(E_Illume_Layout_Policy, E_ILLUME_LAYOUT_POLICY_TYPE,
_e_mod_layout_policy_free);
+ if (!policy) return 0;
/* attempt to open .so */
policy->handle = dlopen(dir, RTLD_NOW | RTLD_GLOBAL);
}
/* initialize the policy */
- policy->funcs.init(policy);
+ if (!policy->funcs.init(policy))
+ {
+ E_ILLUME_ERR("Policy failed to initialize: %s", dir);
+ e_object_del(E_OBJECT(policy));
+ policy = NULL;
+ return 0;
+ }
return 1;
}
{
/* call the policy shutdown function if we can */
if (p->funcs.shutdown) p->funcs.shutdown(p);
-
p->funcs.shutdown = NULL;
+
p->funcs.init = NULL;
p->api = NULL;
E_Border *fbd;
zone = e_util_zone_window_find(ev->win);
+ if (!zone) return 1;
+
focused = e_border_focus_stack_get();
+ if (!focused) return 1;
+
EINA_LIST_FOREACH(focused, l, fbd)
{
if (fbd->zone != zone) continue;
f2 = eina_list_append(f2, fbd);
}
+
+ if (!f2) return 1;
if (eina_list_count(f2) < 1) return 1;
+
EINA_LIST_REVERSE_FOREACH(f2, l, fbd)
{
if (e_object_is_del(E_OBJECT(fbd))) continue;