43 lines
1.4 KiB
Diff
43 lines
1.4 KiB
Diff
From 038962d643361f44ddb58ae9611a9386b291e7f1 Mon Sep 17 00:00:00 2001
|
|
From: Daiki Ueno <dueno@src.gnome.org>
|
|
Date: Sat, 29 Sep 2018 09:40:14 +0200
|
|
Subject: [PATCH] system-prompter: Fix use of g_hash_table_lookup_extended
|
|
|
|
Since the glib commit 8dc8b33d, g_hash_table_lookup_extended() started
|
|
to clear the argument to NULL, even if the lookup failed. Do not
|
|
expect the original key is preserved in that case.
|
|
|
|
Fixes #9.
|
|
---
|
|
gcr/gcr-system-prompter.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/gcr/gcr-system-prompter.c b/gcr/gcr-system-prompter.c
|
|
index 975abe4..39250e7 100644
|
|
--- a/gcr/gcr-system-prompter.c
|
|
+++ b/gcr/gcr-system-prompter.c
|
|
@@ -491,17 +491,19 @@ prompt_stop_prompting (GcrSystemPrompter *self,
|
|
ActivePrompt *active;
|
|
GVariant *retval;
|
|
gpointer watch;
|
|
+ Callback *orig_callback;
|
|
|
|
g_debug ("stopping prompting for operation %s@%s",
|
|
callback->path, callback->name);
|
|
|
|
/* Get a pointer to our actual callback */
|
|
if (!g_hash_table_lookup_extended (self->pv->callbacks, callback,
|
|
- (gpointer *)&callback, &watch)) {
|
|
+ (gpointer *)&orig_callback, &watch)) {
|
|
g_debug ("couldn't find the callback for prompting operation %s@%s",
|
|
callback->path, callback->name);
|
|
return;
|
|
}
|
|
+ callback = orig_callback;
|
|
|
|
/*
|
|
* We remove these from the callbacks hash table so that we don't
|
|
--
|
|
2.19.1
|
|
|