forked from enlightenment/efl
From: Patryk Kaczmarek <patryk.k@samsung.com>
Subject: Re: [E-devel] [Patch] [Ecore] Patch with NULL checks to some functions in ecore module I had prepared patch for some Ecore functions which, in my opinion, critically need NULL checks. I had tried to keep each file convention. SVN revision: 76852
This commit is contained in:
parent
0b753f3e33
commit
23676f34fb
|
@ -424,8 +424,14 @@ ecore_getopt_callback_ecore_evas_list_engines(const Ecore_Getopt *parser __UNUSE
|
|||
{
|
||||
Eina_List *lst, *n;
|
||||
const char *engine;
|
||||
FILE *fp = data;
|
||||
|
||||
if (!storage)
|
||||
{
|
||||
ERR("Storage is missing");
|
||||
return 0;
|
||||
}
|
||||
|
||||
FILE *fp = data;
|
||||
if (!fp)
|
||||
fp = stdout;
|
||||
|
||||
|
|
|
@ -1011,6 +1011,8 @@ ecore_file_escape_name(const char *filename)
|
|||
char *q;
|
||||
char buf[PATH_MAX];
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(filename, NULL);
|
||||
|
||||
p = filename;
|
||||
q = buf;
|
||||
while (*p)
|
||||
|
|
|
@ -110,6 +110,12 @@ _ecore_file_download(const char *url,
|
|||
Eina_Hash *headers)
|
||||
{
|
||||
#ifdef BUILD_ECORE_CON
|
||||
if (!url)
|
||||
{
|
||||
CRIT("Download URL is null");
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
char *dir = ecore_file_dir_get(dst);
|
||||
|
||||
if (!ecore_file_is_dir(dir))
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <Ecore.h>
|
||||
#include "ecore_private.h"
|
||||
#include "Ecore_IMF_Evas.h"
|
||||
|
||||
/**
|
||||
|
@ -299,6 +302,18 @@ EAPI void
|
|||
ecore_imf_evas_event_key_up_wrap(Evas_Event_Key_Up *evas_event,
|
||||
Ecore_IMF_Event_Key_Up *imf_event)
|
||||
{
|
||||
if (!evas_event)
|
||||
{
|
||||
ERR("Evas event is missing");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!imf_event)
|
||||
{
|
||||
ERR("Imf event is missing");
|
||||
return;
|
||||
}
|
||||
|
||||
imf_event->keyname = evas_event->keyname ? evas_event->keyname : _ecore_imf_evas_event_empty;
|
||||
imf_event->key = evas_event->key ? evas_event->key : _ecore_imf_evas_event_empty;
|
||||
imf_event->string = evas_event->string ? evas_event->string : _ecore_imf_evas_event_empty;
|
||||
|
|
Loading…
Reference in New Issue