From f64e1958444d087264f9ae76a00f515225136a66 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Tue, 29 Dec 2015 14:33:21 +0900 Subject: [PATCH] Evas: Fix potential crash with extraneous eet_shutdown Shutdown eet only if it was actually initialized. This fixes make check (for me) after applying the previous patch. It seems on my machine, the gl cache files are not saved properly from within the make check environment. --- src/modules/evas/engines/gl_common/evas_gl_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_core.c b/src/modules/evas/engines/gl_common/evas_gl_core.c index 2059957780..16e163b0e3 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_core.c +++ b/src/modules/evas/engines/gl_common/evas_gl_core.c @@ -819,6 +819,9 @@ _surface_cap_cache_save() char cap_file_path[PATH_MAX]; char tmp_file[PATH_MAX]; + /* use eet */ + if (!eet_init()) return 0; + if (!evas_gl_common_file_cache_dir_check(cap_dir_path, sizeof(cap_dir_path))) { res = evas_gl_common_file_cache_mkpath(cap_dir_path); @@ -834,9 +837,6 @@ _surface_cap_cache_save() if (tmpfd < 0) goto error; close(tmpfd); - /* use eet */ - if (!eet_init()) goto error; - et = eet_open(tmp_file, EET_FILE_MODE_WRITE); if (!et) goto error;