summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-04-08 21:33:28 +0200
committerraveit65 <[email protected]>2020-05-05 16:34:20 +0200
commit4348cd0ad168ed2f334fd8f3e627d3926e8f3880 (patch)
treed12344fbe0a25ea56540a4a1412b82b9fc839cb6 /src
parent850d2a3319acfe912b4e91887f036406c44fcd56 (diff)
downloadcaja-4348cd0ad168ed2f334fd8f3e627d3926e8f3880.tar.bz2
caja-4348cd0ad168ed2f334fd8f3e627d3926e8f3880.tar.xz
Remove the warning: the address of ‘iter’ will never be NULL
Diffstat (limited to 'src')
-rw-r--r--src/caja-file-management-properties.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/caja-file-management-properties.c b/src/caja-file-management-properties.c
index 1cdc7b1d..2761a85b 100644
--- a/src/caja-file-management-properties.c
+++ b/src/caja-file-management-properties.c
@@ -726,21 +726,19 @@ extension_list_selection_changed_configure (GtkTreeSelection *selection, GtkButt
static void
extension_state_toggled (GtkCellRendererToggle *cell, gchar *path_str, gpointer data)
{
- GtkTreeIter iter;
- GtkTreePath *path;
- GtkTreeModel *model;
+ GtkTreeIter iter;
+ GtkTreePath *path;
+ GtkTreeModel *model;
gboolean new_state;
Extension *ext;
- path = gtk_tree_path_new_from_string (path_str);
- model = gtk_tree_view_get_model (GTK_TREE_VIEW (data));
+ path = gtk_tree_path_new_from_string (path_str);
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (data));
g_object_get (G_OBJECT (cell), "active", &new_state, NULL);
- gtk_tree_model_get_iter_from_string (model, &iter, path_str);
-
new_state ^= 1;
- if (&iter != NULL)
+ if (gtk_tree_model_get_iter_from_string (model, &iter, path_str))
{
gtk_tree_model_get (model, &iter, EXT_STRUCT_COLUMN, &ext, -1);