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>
This commit is contained in:
Chris Michael 2013-08-15 07:30:45 +01:00
parent 7eccd49419
commit d0c24254cc
1 changed files with 1 additions and 1 deletions

View File

@ -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,