summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-04-08 21:33:28 +0200
committerraveit65 <[email protected]>2022-07-20 23:49:40 +0200
commit7807e663a72f7045cec5b1033779f47e8f326da8 (patch)
tree800e7a349e9692031cd4193468d587729bcd36c8 /src
parent0f12710f5dc81d3fcaaf95d47d6b5190ad6f97d7 (diff)
downloadcaja-7807e663a72f7045cec5b1033779f47e8f326da8.tar.bz2
caja-7807e663a72f7045cec5b1033779f47e8f326da8.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 80d04d7f..ceaed3ac 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);