summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-08-15 07:30:45 +0100
committerChris Michael <cp.michael@samsung.com>2013-08-15 07:32:18 +0100
commitd0c24254cc8736c455aa5e2b6c84afe09c00324c (patch)
tree27c136da3a5f1d62299446c2e023361e97c823b1 /src/lib
parent7eccd49419a37b5f1bfe6d4137b438995e36a348 (diff)
An Imf module can fail to create a context so we should check the
return of module->create for valid context before trying to call functions or use it. Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ecore_imf/ecore_imf_module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ecore_imf/ecore_imf_module.c b/src/lib/ecore_imf/ecore_imf_module.c
index 296f6bfcb5..d16ad6e41d 100644
--- a/src/lib/ecore_imf/ecore_imf_module.c
+++ b/src/lib/ecore_imf/ecore_imf_module.c
@@ -157,7 +157,7 @@ ecore_imf_module_context_create(const char *ctx_id)
157 module = eina_hash_find(modules, ctx_id); 157 module = eina_hash_find(modules, ctx_id);
158 if (module) 158 if (module)
159 { 159 {
160 ctx = module->create(); 160 if (!(ctx = module->create())) return NULL;
161 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) 161 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
162 { 162 {
163 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, 163 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,