aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@gmail.com>2016-02-03 15:23:34 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-02-03 15:27:43 -0800
commit505491c47c7939e2fab2c2188a26ff5406f35fe5 (patch)
tree9fff7c6393e669a856cedd9a9e273fb2633a279c
parentedje: add "keys" block to classes setter/getter (diff)
downloadefl-505491c47c7939e2fab2c2188a26ff5406f35fe5.tar.gz
edje: fix edje_file_data_get() when no collections are present
Summary: edje_file_data_get() failed if the Edje file did not contain a collection (e.g. contained only data.item. This allows to load data from the file even when no collections are present, but only if specified. @fix Reviewers: raster, jpeg, stefan_schmidt, cedric Reviewed By: cedric Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D3632 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/edje/edje_cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/edje/edje_cache.c b/src/lib/edje/edje_cache.c
index ab8a9b4dae..526324ed83 100644
--- a/src/lib/edje/edje_cache.c
+++ b/src/lib/edje/edje_cache.c
@@ -259,7 +259,7 @@ _edje_file_coll_open(Edje_File *edf, const char *coll)
}
static Edje_File *
-_edje_file_open(const Eina_File *f, int *error_ret, time_t mtime)
+_edje_file_open(const Eina_File *f, int *error_ret, time_t mtime, Eina_Bool coll)
{
Edje_Color_Class *cc;
Edje_Text_Class *tc;
@@ -292,7 +292,7 @@ _edje_file_open(const Eina_File *f, int *error_ret, time_t mtime)
_edje_file_free(edf);
return NULL;
}
- if (!edf->collection)
+ if (!edf->collection && coll)
{
*error_ret = EDJE_LOAD_ERROR_CORRUPT_FILE;
_edje_file_free(edf);
@@ -384,7 +384,7 @@ find_list:
}
}
- edf = _edje_file_open(file, error_ret, eina_file_mtime_get(file));
+ edf = _edje_file_open(file, error_ret, eina_file_mtime_get(file), !!coll);
if (!edf) return NULL;
eina_hash_direct_add(_edje_file_hash, &edf->f, edf);