[network-manager-applet] editor: don't crash in edit_done_cb() when connection is invalid (rh #704848)
- From: Jiří Klimeš <jklimes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet] editor: don't crash in edit_done_cb() when connection is invalid (rh #704848)
- Date: Tue, 17 May 2011 12:29:20 +0000 (UTC)
commit 27c4558761e59716959f6ceb91491d0230ace729
Author: JiÅ?à KlimeÅ¡ <jklimes redhat com>
Date: Tue May 17 14:10:25 2011 +0200
editor: don't crash in edit_done_cb() when connection is invalid (rh #704848)
info structure was g_free()d in connection_updated_cb() and then used by
g_signal_emit().
src/connection-editor/nm-connection-list.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/connection-editor/nm-connection-list.c b/src/connection-editor/nm-connection-list.c
index f60d8af..ff459fd 100644
--- a/src/connection-editor/nm-connection-list.c
+++ b/src/connection-editor/nm-connection-list.c
@@ -662,6 +662,7 @@ edit_done_cb (NMConnectionEditor *editor, gint response, GError *error, gpointer
NM_REMOTE_CONNECTION (connection),
connection_updated_cb,
info);
+ g_signal_emit (info->list, list_signals[EDITING_DONE], 0, 0);
} else {
g_warning ("%s: invalid connection after update: bug in the "
"'%s' / '%s' invalid: %d",
@@ -671,10 +672,12 @@ edit_done_cb (NMConnectionEditor *editor, gint response, GError *error, gpointer
connection_updated_cb (info->list,
NM_REMOTE_CONNECTION (connection),
edit_error,
- info);
+ NULL);
g_error_free (edit_error);
+
+ g_signal_emit (info->list, list_signals[EDITING_DONE], 0, 0);
+ g_free (info);
}
- g_signal_emit (info->list, list_signals[EDITING_DONE], 0, 0);
break;
case GTK_RESPONSE_NONE:
/* Show an error dialog if the editor initialization failed */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]