fix possible NULL issues

devs/discomfitor/cc
Boris Faure 9 years ago
parent 0313446e79
commit 00fbb359ee
  1. 7
      src/bin/options_wallpaper.c
  2. 5
      src/bin/termio.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,

@ -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;
}

Loading…
Cancel
Save