billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=00fbb359eee01be5d10c2791f7b3e3d06563d607

commit 00fbb359eee01be5d10c2791f7b3e3d06563d607
Author: Boris Faure <bill...@gmail.com>
Date:   Tue Mar 25 21:49:10 2014 +0100

    fix possible NULL issues
---
 src/bin/options_wallpaper.c | 7 +++++--
 src/bin/termio.c            | 5 +++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/bin/options_wallpaper.c b/src/bin/options_wallpaper.c
index 6bec4fb..5636630 100644
--- a/src/bin/options_wallpaper.c
+++ b/src/bin/options_wallpaper.c
@@ -379,8 +379,11 @@ _cb_grid_doubleclick(void *data EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
 {
    Config *config = termio_config_get(_term);
    char *config_background_dir = ecore_file_dir_get(config->background);
-   if (!_user_path)
-     _user_background_dir_init();
+
+   if (!_user_path) {
+     if (!_user_background_dir_init())
+       return;
+   }
    if (!config->background) 
      return;
    if (strncmp(config_background_dir, _user_path, 
diff --git a/src/bin/termio.c b/src/bin/termio.c
index 0c74d11..35d8a68 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -1966,7 +1966,8 @@ _smart_cb_key_up(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNUSED,
 static Eina_Bool
 _is_modifier(const char *key)
 {
-   if ((!strncmp(key, "Shift", 5)) ||
+   if ((key != NULL) && (
+       (!strncmp(key, "Shift", 5)) ||
        (!strncmp(key, "Control", 7)) ||
        (!strncmp(key, "Alt", 3)) ||
        (!strncmp(key, "Meta", 4)) ||
@@ -1974,7 +1975,7 @@ _is_modifier(const char *key)
        (!strncmp(key, "Hyper", 5)) ||
        (!strcmp(key, "Scroll_Lock")) ||
        (!strcmp(key, "Num_Lock")) ||
-       (!strcmp(key, "Caps_Lock")))
+       (!strcmp(key, "Caps_Lock"))))
      return EINA_TRUE;
    return EINA_FALSE;
 }

-- 


Reply via email to