Skip to content

Commit

Permalink
Merge pull request #788 from LemonBoy/fix-787
Browse files Browse the repository at this point in the history
Keep a copy of the strings coming from the config
  • Loading branch information
ailin-nemui committed Nov 14, 2017
2 parents 7e619ed + 66b2c9b commit 933fac7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/fe-common/core/hilight-text.c
Expand Up @@ -106,6 +106,7 @@ static void hilight_destroy(HILIGHT_REC *rec)
if (rec->channels != NULL) g_strfreev(rec->channels);
g_free_not_null(rec->color);
g_free_not_null(rec->act_color);
g_free_not_null(rec->servertag);
g_free(rec->text);
g_free(rec);
}
Expand Down Expand Up @@ -424,7 +425,7 @@ static void read_hilight_config(void)
CONFIG_NODE *node;
HILIGHT_REC *rec;
GSList *tmp;
char *text, *color;
char *text, *color, *servertag;

hilights_destroy_all();

Expand Down Expand Up @@ -467,7 +468,9 @@ static void read_hilight_config(void)
rec->nickmask = config_node_get_bool(node, "mask", FALSE);
rec->fullword = config_node_get_bool(node, "fullword", FALSE);
rec->regexp = config_node_get_bool(node, "regexp", FALSE);
rec->servertag = config_node_get_str(node, "servertag", NULL);
servertag = config_node_get_str(node, "servertag", NULL);
rec->servertag = servertag == NULL || *servertag == '\0' ? NULL :
g_strdup(servertag);
hilight_init_rec(rec);

node = iconfig_node_section(node, "channels", -1);
Expand Down

0 comments on commit 933fac7

Please sign in to comment.