Fix an oversight in ensuring search item uniqueness

We were using a guaranteed-to-be-NULL string instead of the
one we were actually meaning to use.
This commit is contained in:
Matthias Clasen
2015-10-13 18:47:51 -04:00
parent 03ef1adfb3
commit 337f4e8f95

View File

@@ -258,7 +258,7 @@ gtk_shortcuts_window_add_search_item (GtkShortcutsWindow *self,
"title", &title,
NULL);
hash_key = g_strdup_printf ("%s-%s", title, hash_key);
hash_key = g_strdup_printf ("%s-%s", title, accelerator);
if (g_hash_table_contains (priv->search_items_hash, hash_key))
{
g_free (hash_key);
@@ -293,7 +293,7 @@ gtk_shortcuts_window_add_search_item (GtkShortcutsWindow *self,
"title", &title,
NULL);
hash_key = g_strdup_printf ("%s-%s", title, hash_key);
hash_key = g_strdup_printf ("%s-%s", title, subtitle);
if (g_hash_table_contains (priv->search_items_hash, hash_key))
{
g_free (subtitle);