From: <bre...@us...> - 2008-07-17 02:38:06
|
Revision: 1225 http://conky.svn.sourceforge.net/conky/?rev=1225&view=rev Author: brenden1 Date: 2008-07-17 02:38:04 +0000 (Thu, 17 Jul 2008) Log Message: ----------- * Fixed bug with $if_empty and $mpd_* vars (sf.net #2008752) Modified Paths: -------------- trunk/conky1/ChangeLog trunk/conky1/src/conky.c Modified: trunk/conky1/ChangeLog =================================================================== --- trunk/conky1/ChangeLog 2008-07-15 01:05:37 UTC (rev 1224) +++ trunk/conky1/ChangeLog 2008-07-17 02:38:04 UTC (rev 1225) @@ -1,5 +1,8 @@ # $Id$ +2008-07-16 + * Fixed bug with $if_empty and $mpd_* vars (sf.net #2008752) + 2008-07-06 * Made log/normal argument for graphs optional Modified: trunk/conky1/src/conky.c =================================================================== --- trunk/conky1/src/conky.c 2008-07-15 01:05:37 UTC (rev 1224) +++ trunk/conky1/src/conky.c 2008-07-17 02:38:04 UTC (rev 1225) @@ -2075,7 +2075,10 @@ return obj; } -static void free_text_objects(struct text_object_list *text_object_list) +/* + * call with full == 0 when freeing after 'internal' evaluation of objects + */ +static void free_text_objects(struct text_object_list *text_object_list, char full) { unsigned int i; struct text_object *obj; @@ -2377,7 +2380,9 @@ case OBJ_mpd_file: case OBJ_mpd_percent: case OBJ_mpd_smart: - free_mpd_vars(&info.mpd); + if (full) { + free_mpd_vars(&info.mpd); + } break; #endif case OBJ_scroll: @@ -4219,7 +4224,7 @@ static void extract_variable_text(const char *p) { - free_text_objects(global_text_object_list); + free_text_objects(global_text_object_list, 1); free(global_text_object_list); if (tmpstring1) { free(tmpstring1); @@ -5001,7 +5006,7 @@ memcpy(tmp_info, cur, sizeof(struct information)); text_objects = parse_conky_vars(p, p, tmp_info); - free_text_objects(text_objects); + free_text_objects(text_objects, 0); free(text_objects); free(tmp_info); } @@ -5099,7 +5104,7 @@ text_objects = parse_conky_vars(obj->data.execi.buffer, p, tmp_info); obj->data.execi.last_update = current_update_time; } - free_text_objects(text_objects); + free_text_objects(text_objects, 0); free(text_objects); free(tmp_info); } @@ -5415,7 +5420,7 @@ if_jumped = 0; } p[0] = '\0'; - free_text_objects(text_objects); + free_text_objects(text_objects, 0); free(text_objects); free(tmp_info); } @@ -7804,7 +7809,7 @@ free_fonts(); #endif /* X11 */ - free_text_objects(global_text_object_list); + free_text_objects(global_text_object_list, 1); free(global_text_object_list); global_text_object_list = NULL; if (tmpstring1) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |