Enlightenment CVS committal

Author  : andrunko
Project : e17
Module  : libs/etk

Dir     : e17/libs/etk/src/lib


Modified Files:
        etk_entry.c 


Log Message:
Do not crash when no input method context module is installed.

===================================================================
RCS file: /cvs/e/e17/libs/etk/src/lib/etk_entry.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- etk_entry.c 21 Nov 2007 22:20:16 -0000      1.47
+++ etk_entry.c 22 Nov 2007 14:55:43 -0000      1.48
@@ -567,16 +567,21 @@
       return ETK_TRUE;
 
    ctx_id = ecore_imf_context_default_id_get();
-   ctx_info = ecore_imf_context_info_by_id_get(ctx_id);
-   if (!ctx_info->canvas_type ||
-       strcmp(ctx_info->canvas_type, "evas") == 0)
-       entry->imf_context = ecore_imf_context_add(ctx_id);
-   else
+   if (ctx_id)
    {
-       ctx_id = ecore_imf_context_default_id_by_canvas_type_get("evas");
-       if (ctx_id)
-           entry->imf_context = ecore_imf_context_add(ctx_id);
+      ctx_info = ecore_imf_context_info_by_id_get(ctx_id);
+      if (!ctx_info->canvas_type ||
+          strcmp(ctx_info->canvas_type, "evas") == 0)
+         entry->imf_context = ecore_imf_context_add(ctx_id);
+      else
+      {
+         ctx_id = ecore_imf_context_default_id_by_canvas_type_get("evas");
+         if (ctx_id)
+            entry->imf_context = ecore_imf_context_add(ctx_id);
+      }
    }
+   else
+      entry->imf_context = NULL;
 
    if (entry->imf_context)
    {



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to