From: Enlightenment S. <no-...@en...> - 2010-07-14 02:22:17
|
Log: Fix goof from automated tools (Coccinelle) and make sure we have a KEY before trying to stringshare it. Author: devilhorns Date: 2010-07-13 19:22:10 -0700 (Tue, 13 Jul 2010) New Revision: 50243 Modified: trunk/e/src/modules/illume/e_kbd_buf.c Modified: trunk/e/src/modules/illume/e_kbd_buf.c =================================================================== --- trunk/e/src/modules/illume/e_kbd_buf.c 2010-07-14 02:20:30 UTC (rev 50242) +++ trunk/e/src/modules/illume/e_kbd_buf.c 2010-07-14 02:22:10 UTC (rev 50243) @@ -29,7 +29,7 @@ while (kbl->keys) { E_Kbd_Buf_Key *ky; - + ky = kbl->keys->data; if (ky->key) eina_stringshare_del(ky->key); if (ky->key_shift) eina_stringshare_del(ky->key_shift); @@ -384,7 +384,7 @@ if (!kb->layout) return; ky = E_NEW(E_Kbd_Buf_Key, 1); if (!ky) return; - ky->key = eina_stringshare_add(key); + if (key) ky->key = eina_stringshare_add(key); if (key_shift) ky->key_shift = eina_stringshare_add(key_shift); if (key_capslock) ky->key_capslock = eina_stringshare_add(key_capslock); ky->x = x; |