summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2018-01-14 23:28:15 +0100
committerLubomir Rintel <lkundrak@v3.sk>2018-01-15 10:57:07 +0100
commita37483c1a364ef3cc1cfa29e7ad51ca108d75674 (patch)
tree7cd7406126dcc747c253f49634217bf321ca83bd
parent056bb3cd6016884c0ae574a942910d9c24388fe6 (diff)
downloadnetwork-manager-applet-a37483c1a364ef3cc1cfa29e7ad51ca108d75674.tar.gz
libnma/cert-chooser: handle case of no avalable modules
Cause: Apparently it's perfectly okay if the list of modules is empty (e.g., NULL). However, the code assume that this indicates an error, tries to print the NULL error, and crashes. [lkundrak@v3.sk: cosmetic changes] https://bugzilla.gnome.org/show_bug.cgi?id=785674
-rw-r--r--src/libnma/nma-cert-chooser-button.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libnma/nma-cert-chooser-button.c b/src/libnma/nma-cert-chooser-button.c
index c7089390..00651765 100644
--- a/src/libnma/nma-cert-chooser-button.c
+++ b/src/libnma/nma-cert-chooser-button.c
@@ -93,10 +93,10 @@ modules_initialized (GObject *object, GAsyncResult *res, gpointer user_data)
gchar *label;
modules = gck_modules_initialize_registered_finish (res, &error);
- if (!modules) {
+ if (error) {
/* The Front Fell Off. */
- g_critical ("Error getting registered modules: %s", error->message);
- g_error_free (error);
+ g_warning ("Error getting registered modules: %s", error->message);
+ g_clear_error (&error);
}
model = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (self)));