1
1
mirror of https://github.com/profanity-im/profanity.git synced 2025-02-02 15:08:15 -05:00

Merge branch 'master' into plugins

This commit is contained in:
James Booth 2014-06-18 22:35:37 +01:00
commit b25d0b8821
2 changed files with 9 additions and 4 deletions

View File

@ -980,6 +980,7 @@ cmd_init(void)
g_string_free(ac_alias, TRUE);
curr = g_list_next(curr);
}
prefs_free_aliases(aliases);
prefs_ac = autocomplete_new();
autocomplete_add(prefs_ac, "ui");

View File

@ -361,11 +361,15 @@ prefs_get_aliases(void)
char *name = keys[i];
char *value = g_key_file_get_string(prefs, PREF_GROUP_ALIAS, name, NULL);
ProfAlias *alias = malloc(sizeof(struct prof_alias_t));
alias->name = strdup(name);
alias->value = strdup(value);
if (value != NULL) {
ProfAlias *alias = malloc(sizeof(struct prof_alias_t));
alias->name = strdup(name);
alias->value = strdup(value);
result = g_list_insert_sorted(result, alias, (GCompareFunc)_alias_cmp);
free(value);
result = g_list_insert_sorted(result, alias, (GCompareFunc)_alias_cmp);
}
}
g_strfreev(keys);