From 337f4e8f950590b6cf249fded1cb05da015a5513 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 13 Oct 2015 18:47:51 -0400 Subject: [PATCH] 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. --- gtk/gtkshortcutswindow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/gtkshortcutswindow.c b/gtk/gtkshortcutswindow.c index 00d711566e..c4c2353e73 100644 --- a/gtk/gtkshortcutswindow.c +++ b/gtk/gtkshortcutswindow.c @@ -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);