Blame SOURCES/0003-fix-cert-chooser-for-no-modules-bgo785674.patch

3a0b39
From 4d2523b482ab78134dafc02c9b99bd15f1a9174a Mon Sep 17 00:00:00 2001
3a0b39
From: Ben Wiederhake <BenWiederhake.GitHub@gmx.de>
3a0b39
Date: Sun, 14 Jan 2018 23:28:15 +0100
3a0b39
Subject: [PATCH 1/1] libnma/cert-chooser: handle case of no avalable modules
3a0b39
3a0b39
Cause: Apparently it's perfectly okay if the list of modules is empty
3a0b39
(e.g., NULL).  However, the code assume that this indicates an error,
3a0b39
tries to print the NULL error, and crashes.
3a0b39
3a0b39
[lkundrak@v3.sk: cosmetic changes]
3a0b39
3a0b39
https://bugzilla.gnome.org/show_bug.cgi?id=785674
3a0b39
(cherry picked from commit a37483c1a364ef3cc1cfa29e7ad51ca108d75674)
3a0b39
---
3a0b39
 src/libnma/nma-cert-chooser-button.c | 6 +++---
3a0b39
 1 file changed, 3 insertions(+), 3 deletions(-)
3a0b39
3a0b39
diff --git a/src/libnma/nma-cert-chooser-button.c b/src/libnma/nma-cert-chooser-button.c
3a0b39
index c7089390..00651765 100644
3a0b39
--- a/src/libnma/nma-cert-chooser-button.c
3a0b39
+++ b/src/libnma/nma-cert-chooser-button.c
3a0b39
@@ -93,10 +93,10 @@ modules_initialized (GObject *object, GAsyncResult *res, gpointer user_data)
3a0b39
 	gchar *label;
3a0b39
 
3a0b39
 	modules = gck_modules_initialize_registered_finish (res, &error);
3a0b39
-	if (!modules) {
3a0b39
+	if (error) {
3a0b39
 		/* The Front Fell Off. */
3a0b39
-		g_critical ("Error getting registered modules: %s", error->message);
3a0b39
-		g_error_free (error);
3a0b39
+		g_warning ("Error getting registered modules: %s", error->message);
3a0b39
+		g_clear_error (&error);
3a0b39
 	}
3a0b39
 
3a0b39
 	model = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (self)));
3a0b39
-- 
3a0b39
2.14.3
3a0b39