Hi All,

I've added a checking null of im_info to get_ic().

Would you review this patch?

Best Regards.
-- 
Naruto TAKAHASHI
tnar...@gmail.com
diff --git a/ecore/src/modules/immodules/xim/ecore_imf_xim.c 
b/ecore/src/modules/immodules/xim/ecore_imf_xim.c
index 791fdab..76ae9aa 100644
--- a/ecore/src/modules/immodules/xim/ecore_imf_xim.c
+++ b/ecore/src/modules/immodules/xim/ecore_imf_xim.c
@@ -451,11 +451,6 @@ _ecore_imf_context_xim_filter_event(Ecore_IMF_Context   
*ctx,
    Eina_Bool result = EINA_FALSE;
 
    imf_context_data = ecore_imf_context_data_get(ctx);
-   ic = imf_context_data->ic;
-   if(!ic)
-     {
-        ic = get_ic(ctx);
-     }
 
    if(type == ECORE_IMF_EVENT_KEY_DOWN)
      {
@@ -482,6 +477,8 @@ _ecore_imf_context_xim_filter_event(Ecore_IMF_Context   
*ctx,
         xev.keycode = _keycode_get(dsp, ev->keyname);
         xev.same_screen = True;
 
+        ic = get_ic(ctx);
+
         if(ic)
           {
              Status mbstatus;
@@ -926,6 +923,12 @@ get_ic(Ecore_IMF_Context *ctx)
         XPoint spot = { 0, 0 };
         char *name = NULL;
         
+        if(!im_info)
+          {
+             EINA_LOG_WARN("Doesn't open XIM.");
+             return NULL;
+          }
+
         // supported styles
 #if 0
         int i;
------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to