[NetworkManager-fortisslvpn/lr/gtk4: 1/5] properties: fix crash on teardown upon failure to initialize
- From: Lubomir Rintel <lkundrak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [NetworkManager-fortisslvpn/lr/gtk4: 1/5] properties: fix crash on teardown upon failure to initialize
- Date: Tue, 12 Oct 2021 08:30:02 +0000 (UTC)
commit 1b6e35986212146ccc874ca0a8215041e69f7fd9
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Mon Oct 11 15:02:37 2021 +0200
properties: fix crash on teardown upon failure to initialize
(process:1285020): GLib-GObject-WARNING **: 15:01:43.281: invalid (NULL) pointer instance
Thread 1 "run-vpn-gtk4" received signal SIGTRAP, Trace/breakpoint trap.
g_logv (log_domain=0x7ffff71b5012 "GLib-GObject", log_level=G_LOG_LEVEL_WARNING, format=<optimized
out>, args=<optimized out>) at ../glib/gmessages.c:1417
1417 g_private_set (&g_log_depth, GUINT_TO_POINTER (depth));
(gdb) bt
#0 g_logv (log_domain=0x7ffff71b5012 "GLib-GObject", log_level=G_LOG_LEVEL_WARNING, format=<optimized
out>, args=<optimized out>) at ../glib/gmessages.c:1417
#1 0x00007ffff7090773 in g_log (log_domain=log_domain@entry=0x7ffff71b5012 "GLib-GObject",
log_level=log_level@entry=G_LOG_LEVEL_WARNING, format=<optimized out>) at ../glib/gmessages.c:1455
#2 0x00007ffff71ae8ea in g_type_check_instance (type_instance=<optimized out>) at
../gobject/gtype.c:4208
#3 0x00007ffff71a1c58 in g_signal_handlers_disconnect_matched
(instance=0x0, mask=mask@entry=(G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA),
signal_id=signal_id@entry=0, detail=detail@entry=0, closure=closure@entry=0x0, func=func@entry=0x7fffe42ebcb0
<password_storage_changed_cb>, data=0x5aba20) at ../gobject/gsignal.c:3022
#4 0x00007fffe42ebac3 in dispose (object=0x5aba20 [FortisslvpnEditor]) at
properties/nm-fortisslvpn-editor.c:529
#5 0x00007ffff7197b14 in g_object_unref (_object=<optimized out>) at ../gobject/gobject.c:3549
#6 g_object_unref (_object=0x5aba20) at ../gobject/gobject.c:3479
#7 0x00007fffe42ec87b in nm_fortisslvpn_editor_new (connection=0x5ad260, error=0x7fffffffd9b8) at
properties/nm-fortisslvpn-editor.c:494
#8 0x00007fffe4d3a545 in nm_vpn_plugin_utils_load_editor
(module_name=0x7fffe4d3b418 "libnm-gtk4-vpn-plugin-fortisslvpn-editor.so",
factory_name=factory_name@entry=0x7fffe4d3b448 "nm_vpn_editor_factory_fortisslvpn",
editor_factory=editor_factory@entry=0x7fffe4d3a890 <_call_editor_factory>,
editor_plugin=editor_plugin@entry=0x597b60, connection=connection@entry=0x5ad260,
user_data=user_data@entry=0x0, error=0x7fffffffd9b8) at shared/nm-utils/nm-vpn-plugin-utils.c:134
#9 0x00007fffe4d3ac39 in get_editor (iface=0x597b60, connection=0x5ad260, error=0x7fffffffd9b8) at
properties/nm-fortisslvpn-editor-plugin.c:103
#10 0x0000000000401305 in main (argc=<optimized out>, argv=<optimized out>) at src/tests/run-vpn.c:65
(gdb)
properties/nm-fortisslvpn-editor.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/properties/nm-fortisslvpn-editor.c b/properties/nm-fortisslvpn-editor.c
index b55a167..0a5d951 100644
--- a/properties/nm-fortisslvpn-editor.c
+++ b/properties/nm-fortisslvpn-editor.c
@@ -515,9 +515,11 @@ dispose (GObject *object)
GtkWidget *widget;
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "user_password_entry"));
- g_signal_handlers_disconnect_by_func (G_OBJECT (widget),
- (GCallback) password_storage_changed_cb,
- plugin);
+ if (widget) {
+ g_signal_handlers_disconnect_by_func (G_OBJECT (widget),
+ (GCallback) password_storage_changed_cb,
+ plugin);
+ }
if (priv->group)
g_object_unref (priv->group);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]