forked from enlightenment/terminology
fix possible NULL issues
This commit is contained in:
parent
0313446e79
commit
00fbb359ee
|
@ -379,8 +379,11 @@ _cb_grid_doubleclick(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||||
{
|
{
|
||||||
Config *config = termio_config_get(_term);
|
Config *config = termio_config_get(_term);
|
||||||
char *config_background_dir = ecore_file_dir_get(config->background);
|
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)
|
if (!config->background)
|
||||||
return;
|
return;
|
||||||
if (strncmp(config_background_dir, _user_path,
|
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
|
static Eina_Bool
|
||||||
_is_modifier(const char *key)
|
_is_modifier(const char *key)
|
||||||
{
|
{
|
||||||
if ((!strncmp(key, "Shift", 5)) ||
|
if ((key != NULL) && (
|
||||||
|
(!strncmp(key, "Shift", 5)) ||
|
||||||
(!strncmp(key, "Control", 7)) ||
|
(!strncmp(key, "Control", 7)) ||
|
||||||
(!strncmp(key, "Alt", 3)) ||
|
(!strncmp(key, "Alt", 3)) ||
|
||||||
(!strncmp(key, "Meta", 4)) ||
|
(!strncmp(key, "Meta", 4)) ||
|
||||||
|
@ -1974,7 +1975,7 @@ _is_modifier(const char *key)
|
||||||
(!strncmp(key, "Hyper", 5)) ||
|
(!strncmp(key, "Hyper", 5)) ||
|
||||||
(!strcmp(key, "Scroll_Lock")) ||
|
(!strcmp(key, "Scroll_Lock")) ||
|
||||||
(!strcmp(key, "Num_Lock")) ||
|
(!strcmp(key, "Num_Lock")) ||
|
||||||
(!strcmp(key, "Caps_Lock")))
|
(!strcmp(key, "Caps_Lock"))))
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue