[network-manager-pptp] service: fix critical errors in dispose()
- From: Jiří Klimeš <jklimes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-pptp] service: fix critical errors in dispose()
- Date: Fri, 27 Nov 2015 09:04:46 +0000 (UTC)
commit 5194e76cfada58c692df3911f8707204f06051ff
Author: Jiří Klimeš <jklimes redhat com>
Date: Fri Nov 27 10:00:57 2015 +0100
service: fix critical errors in dispose()
It may happen when a gateway was wrong and thus dbus_skeleton was not initialized.
(nm-pptp-service:8511): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(nm-pptp-service:8511): GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched: assertion
'G_TYPE_CHECK_INSTANCE (instance)' failed
(nm-pptp-service:8511): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(nm-pptp-service:8511): GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched: assertion
'G_TYPE_CHECK_INSTANCE (instance)' failed
(nm-pptp-service:8511): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(nm-pptp-service:8511): GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched: assertion
'G_TYPE_CHECK_INSTANCE (instance)' failed
src/nm-pptp-service.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/nm-pptp-service.c b/src/nm-pptp-service.c
index 8b0eeb6..d56c56f 100644
--- a/src/nm-pptp-service.c
+++ b/src/nm-pptp-service.c
@@ -376,9 +376,11 @@ nm_pptp_ppp_service_dispose (GObject *object)
{
NMPptpPppServicePrivate *priv = NM_PPTP_PPP_SERVICE_GET_PRIVATE (object);
- g_signal_handlers_disconnect_by_func (priv->dbus_skeleton, handle_need_secrets, object);
- g_signal_handlers_disconnect_by_func (priv->dbus_skeleton, handle_set_state, object);
- g_signal_handlers_disconnect_by_func (priv->dbus_skeleton, handle_set_ip4_config, object);
+ if (priv->dbus_skeleton) {
+ g_signal_handlers_disconnect_by_func (priv->dbus_skeleton, handle_need_secrets, object);
+ g_signal_handlers_disconnect_by_func (priv->dbus_skeleton, handle_set_state, object);
+ g_signal_handlers_disconnect_by_func (priv->dbus_skeleton, handle_set_ip4_config, object);
+ }
G_OBJECT_CLASS (nm_pptp_ppp_service_parent_class)->dispose (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]