[network-manager-applet] editor: fix a crash when editing a virtual connection
- From: Jiří Klimeš <jklimes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet] editor: fix a crash when editing a virtual connection
- Date: Tue, 10 Mar 2015 09:06:47 +0000 (UTC)
commit 915dc47b2d55e788e6661d0fb6522bddbf6e89fa
Author: Jiří Klimeš <jklimes redhat com>
Date: Mon Mar 9 15:43:43 2015 +0100
editor: fix a crash when editing a virtual connection
Test case:
1. run nm-connection-editor
2. click "Add" button
3. select "Bridge" in combo box and click "Create..." button
4. delete the text in "Interface name:" entry
5. click "Add" button to add a slave
6. click "Create..." button
7. *** crash ***
src/connection-editor/page-master.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/connection-editor/page-master.c b/src/connection-editor/page-master.c
index 1b2b775..abf6fb3 100644
--- a/src/connection-editor/page-master.c
+++ b/src/connection-editor/page-master.c
@@ -370,7 +370,7 @@ add_connection (NMConnection *connection,
iface_name = gtk_entry_get_text (priv->interface_name);
if (!*iface_name)
iface_name = nm_connection_get_interface_name (connection);
- if (!*iface_name)
+ if (!iface_name || !nm_utils_iface_valid_name (iface_name))
iface_name = nm_connection_get_id (connection);
name = g_strdup_printf (_("%s slave %d"), iface_name,
gtk_tree_model_iter_n_children (priv->connections_model, NULL) + 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]