aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_imf
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/ecore_imf
parentpo: updated po files. (diff)
downloadefl-d0c24254cc8736c455aa5e2b6c84afe09c00324c.tar.gz
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/ecore_imf')
-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)
module = eina_hash_find(modules, ctx_id);
if (module)
{
- ctx = module->create();
+ if (!(ctx = module->create())) return NULL;
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,