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;
|
Eina_List *lst, *n;
|
||||||
const char *engine;
|
const char *engine;
|
||||||
FILE *fp = data;
|
|
||||||
|
|
||||||
|
if (!storage)
|
||||||
|
{
|
||||||
|
ERR("Storage is missing");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
FILE *fp = data;
|
||||||
if (!fp)
|
if (!fp)
|
||||||
fp = stdout;
|
fp = stdout;
|
||||||
|
|
||||||
|
|
|
@ -1011,6 +1011,8 @@ ecore_file_escape_name(const char *filename)
|
||||||
char *q;
|
char *q;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN_VAL(filename, NULL);
|
||||||
|
|
||||||
p = filename;
|
p = filename;
|
||||||
q = buf;
|
q = buf;
|
||||||
while (*p)
|
while (*p)
|
||||||
|
|
|
@ -110,6 +110,12 @@ _ecore_file_download(const char *url,
|
||||||
Eina_Hash *headers)
|
Eina_Hash *headers)
|
||||||
{
|
{
|
||||||
#ifdef BUILD_ECORE_CON
|
#ifdef BUILD_ECORE_CON
|
||||||
|
if (!url)
|
||||||
|
{
|
||||||
|
CRIT("Download URL is null");
|
||||||
|
return EINA_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
char *dir = ecore_file_dir_get(dst);
|
char *dir = ecore_file_dir_get(dst);
|
||||||
|
|
||||||
if (!ecore_file_is_dir(dir))
|
if (!ecore_file_is_dir(dir))
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <Ecore.h>
|
||||||
|
#include "ecore_private.h"
|
||||||
#include "Ecore_IMF_Evas.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_evas_event_key_up_wrap(Evas_Event_Key_Up *evas_event,
|
||||||
Ecore_IMF_Event_Key_Up *imf_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->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->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;
|
imf_event->string = evas_event->string ? evas_event->string : _ecore_imf_evas_event_empty;
|
||||||
|
|
Loading…
Reference in New Issue