network: Fix possible crash in connection editor
Disable the type-ahead search in the connection editor, the number of items, and their positional stability means that a search feature isn't warranted. As a precaution, also check the success of gtk_tree_selection_get_selected() to avoid crashes. https://bugzilla.gnome.org/show_bug.cgi?id=693685
This commit is contained in:
parent
6a282ca554
commit
c57faf5da5
2 changed files with 3 additions and 2 deletions
|
@ -77,7 +77,7 @@
|
|||
<property name="model">details_store</property>
|
||||
<property name="headers_visible">False</property>
|
||||
<property name="headers_clickable">False</property>
|
||||
<property name="search_column">0</property>
|
||||
<property name="enable-search">False</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="details_page_list_selection"/>
|
||||
</child>
|
||||
|
|
|
@ -59,7 +59,8 @@ selection_changed (GtkTreeSelection *selection, NetConnectionEditor *editor)
|
|||
GtkTreeIter iter;
|
||||
gint page;
|
||||
|
||||
gtk_tree_selection_get_selected (selection, &model, &iter);
|
||||
if (!gtk_tree_selection_get_selected (selection, &model, &iter))
|
||||
return;
|
||||
gtk_tree_model_get (model, &iter, 1, &page, -1);
|
||||
|
||||
widget = GTK_WIDGET (gtk_builder_get_object (editor->builder,
|
||||
|
|
Loading…
Add table
Reference in a new issue