Fix goof from automated tools (Coccinelle) and make sure we have a KEY

before trying to stringshare it.



SVN revision: 50243
This commit is contained in:
Christopher Michael 2010-07-14 02:22:10 +00:00
parent d8dc2a9511
commit bcd63bdfad
1 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ _e_kbd_buf_layout_unref(E_Kbd_Buf_Layout *kbl)
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 @@ e_kbd_buf_layout_key_add(E_Kbd_Buf *kb, const char *key, const char *key_shift,
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;