aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/lib/elm_win.c
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2013-08-11 17:30:56 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2013-08-11 17:39:24 +0900
commit9bb54a942e9dd3a9bce54bd87235b000de6babb9 (patch)
tree964752405857606d042610052bf5f95605ed67de /legacy/elementary/src/lib/elm_win.c
parentelm_prefs.c: make the string null terminated. (diff)
downloadefl-9bb54a942e9dd3a9bce54bd87235b000de6babb9.tar.gz
elm_win.c: check null before dereferencing it.
This fixes coverity CID 1040022 : Dereference null return value (NULL_RETURNS).
Diffstat (limited to 'legacy/elementary/src/lib/elm_win.c')
-rw-r--r--legacy/elementary/src/lib/elm_win.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/legacy/elementary/src/lib/elm_win.c b/legacy/elementary/src/lib/elm_win.c
index cf5344b0bd..444c0225a8 100644
--- a/legacy/elementary/src/lib/elm_win.c
+++ b/legacy/elementary/src/lib/elm_win.c
@@ -224,10 +224,10 @@ _elm_win_on_resize_obj_changed_size_hints(void *data,
EAPI double _elm_startup_time = 0;
static void
-_elm_win_first_frame_do(void *data EINA_UNUSED, Evas *e EINA_UNUSED, void *event_info EINA_UNUSED)
+_elm_win_first_frame_do(void *data, Evas *e EINA_UNUSED, void *event_info EINA_UNUSED)
{
double end = ecore_time_unix_get();
- char *first = getenv("ELM_FIRST_FRAME");
+ char *first = data;
switch (*first)
{
@@ -235,10 +235,10 @@ _elm_win_first_frame_do(void *data EINA_UNUSED, Evas *e EINA_UNUSED, void *event
case 'E':
case 'D': exit(-1);
case 'T': fprintf(stderr, "Startup time: '%f' - '%f' = '%f' sec\n", end, _elm_startup_time, end - _elm_startup_time);
- break;
+ break;
}
- evas_event_callback_del_full(e, EVAS_CALLBACK_RENDER_POST, _elm_win_first_frame_do, NULL);
+ evas_event_callback_del_full(e, EVAS_CALLBACK_RENDER_POST, _elm_win_first_frame_do, data);
}
static void
@@ -2839,7 +2839,7 @@ _win_constructor(Eo *obj, void *_pd, va_list *list)
if (getenv("ELM_FIRST_FRAME"))
evas_event_callback_add(ecore_evas_get(tmp_sd.ee), EVAS_CALLBACK_RENDER_POST,
- _elm_win_first_frame_do, NULL);
+ _elm_win_first_frame_do, getenv("ELM_FIRST_FRAME"));
/* copying possibly altered fields back */
#define SD_CPY(_field) \