1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 18:45:10 +00:00

Fix minor environment variable bug.

This commit is contained in:
Brenden Matthews 2009-04-28 10:54:43 -06:00
parent d1b6548c55
commit 2dfc0ee6b4

View File

@ -2830,13 +2830,16 @@ static int extract_variable_text_internal(struct text_object *retval, const char
var = getenv(buf); var = getenv(buf);
if (var) { if (var) {
obj = create_plain_text(var); obj = create_plain_text(var);
if (obj) if (obj) {
append_object(retval, obj); append_object(retval, obj);
}
continue; continue;
} }
/* if variable wasn't found in environment, use some special */ /* if variable wasn't found in environment, use some special */
arg = 0;
/* split arg */ /* split arg */
if (strchr(buf, ' ')) { if (strchr(buf, ' ')) {
arg = strchr(buf, ' '); arg = strchr(buf, ' ');
@ -2953,7 +2956,7 @@ static inline struct mail_s *ensure_mail_thread(struct text_object *obj,
// something is wrong, warn once then stop // something is wrong, warn once then stop
ERR("There's a problem with your mail settings. " ERR("There's a problem with your mail settings. "
"Check that the global mail settings are properly defined" "Check that the global mail settings are properly defined"
"(line %li).", obj->line); " (line %li).", obj->line);
obj->a++; obj->a++;
} }
return NULL; return NULL;