[gnome-flashback/gnome-3-18] shell: fix assertion 'version == hash_table->version'
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback/gnome-3-18] shell: fix assertion 'version == hash_table->version'
- Date: Thu, 28 Apr 2016 21:20:05 +0000 (UTC)
commit 6bcc631a1f4240e46c5103fe1f228c717aae7d8c
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri Apr 29 00:19:48 2016 +0300
shell: fix assertion 'version == hash_table->version'
gnome-flashback/libshell/flashback-shell.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gnome-flashback/libshell/flashback-shell.c b/gnome-flashback/libshell/flashback-shell.c
index 7e51f52..53a10a2 100644
--- a/gnome-flashback/libshell/flashback-shell.c
+++ b/gnome-flashback/libshell/flashback-shell.c
@@ -108,7 +108,7 @@ real_ungrab (FlashbackShell *shell,
return gf_keybindings_ungrab (shell->keybindings, action);
}
-static void
+static gboolean
ungrab_accelerator (gpointer key,
gpointer value,
gpointer user_data)
@@ -124,8 +124,10 @@ ungrab_accelerator (gpointer key,
if (g_str_equal (sender, data->sender))
{
if (real_ungrab (data->shell, action))
- g_hash_table_remove (data->shell->grabbed_accelerators, key);
+ return TRUE;
}
+
+ return FALSE;
}
static void
@@ -144,7 +146,8 @@ name_vanished_handler (GDBusConnection *connection,
data->sender = name;
data->shell = shell;
- g_hash_table_foreach (shell->grabbed_accelerators, (GHFunc) ungrab_accelerator, data);
+ g_hash_table_foreach_remove (shell->grabbed_accelerators,
+ ungrab_accelerator, data);
g_free (data);
g_bus_unwatch_name (id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]