2012-12-24 Mike Blumenkrantz
* eina_magic_fail() now throws error messages on NULL pointers instead of critical
+ * all efl object-freeing functions now take NULL without crashing or erroring
2012-12-19 Gustavo Sverzut Barbieri (k-s)
repeatedly calling malloc/free.
* Display more information with eet -l -v.
* eina_magic_fail() now throws error messages on NULL pointers instead of critical
+ * all efl object-freeing functions now take NULL without crashing or erroring
Fixes:
* Fix PPC (big endian) image codec bug.
{
void *data = NULL;
+ if (!obj) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
Ecore_Animator_Private_Data *animator = eo_data_get(obj, MY_CLASS);
_ecore_lock();
{
void *data = NULL;
+ if (!event_handler) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
_ecore_lock();
if (!ECORE_MAGIC_CHECK(event_handler, ECORE_MAGIC_EVENT_HANDLER))
{
void *data = NULL;
+ if (!event) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
_ecore_lock();
if (!ECORE_MAGIC_CHECK(event, ECORE_MAGIC_EVENT))
{
void *data = NULL;
+ if (!ef) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
_ecore_lock();
if (!ECORE_MAGIC_CHECK(ef, ECORE_MAGIC_EVENT_FILTER))
int ok = 0;
int result;
+ if (!exe) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
{
{
void *data = NULL;
+ if (!idle_enterer) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
_ecore_lock();
{
void *data;
+ if (!idle_exiter) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
_ecore_lock();
{
void *data = NULL;
+ if (!idler) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
_ecore_lock();
{
void *data;
+ if (!obj) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
Ecore_Job_Private_Data *job = eo_data_get(obj, MY_CLASS);
data = job->data;
{
void *ret = NULL;
+ if (!fd_handler) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
_ecore_lock();
EAPI void *
ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler)
{
+ if (!win32_handler) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
if (!ECORE_MAGIC_CHECK(win32_handler, ECORE_MAGIC_WIN32_HANDLER))
{
ecore_pipe_del(Ecore_Pipe *p)
{
void *r;
+ if (!p) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
_ecore_lock();
r = _ecore_pipe_del(p);
{
void *data;
+ if (!obj) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
Ecore_Poller_Private_Data *poller = eo_data_get(obj, MY_CLASS);
/* we are walking the poller list - a bad idea to remove from it while
{
void *data = NULL;
+ if (!timer) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
_ecore_lock();
EAPI void *
ecore_con_server_del(Ecore_Con_Server *svr)
{
+ if (!svr) return NULL;
if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_CON_SERVER))
{
ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_CON_SERVER, "ecore_con_server_del");
EAPI void *
ecore_con_client_del(Ecore_Con_Client *cl)
{
+ if (!cl) return NULL;
if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_CON_CLIENT))
{
ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_CON_CLIENT, "ecore_con_client_del");
EAPI void
ecore_evas_free(Ecore_Evas *ee)
{
+ if (!ee) return;
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
{
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
EAPI void
ecore_file_monitor_del(Ecore_File_Monitor *em)
{
+ if (!em) return;
EINA_SAFETY_ON_NULL_RETURN(em);
ecore_file_monitor_backend_del(em);
}
{
void *data;
+ if (!svr) return NULL;
if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_IPC_SERVER))
{
ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_IPC_SERVER,
void *data;
Ecore_Ipc_Server *svr;
+ if (!cl) return NULL;
if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_IPC_CLIENT))
{
ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_IPC_CLIENT,
EAPI Eina_Bool
eio_file_cancel(Eio_File *ls)
{
+ if (!ls) return EINA_FALSE;
EINA_SAFETY_ON_NULL_RETURN_VAL(ls, EINA_FALSE);
return ecore_thread_cancel(ls->thread);
}