Commit ecadc01f authored by Germán Poo-Caamaño's avatar Germán Poo-Caamaño Committed by Carlos Garcia Campos

recent-view: Verify a path exists before adding an icon

Fixes warnings when switching from the recent view to
a document back and forth.
parent 48ef4953
......@@ -224,13 +224,17 @@ thumbnail_job_completed_callback (EvJobThumbnail *job,
row = (GtkTreeRowReference *) g_object_get_data (G_OBJECT (job), "row-reference");
path = gtk_tree_row_reference_get_path (row);
gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->model), &iter, path);
gtk_tree_path_free (path);
gtk_list_store_set (priv->model, &iter,
GD_MAIN_COLUMN_ICON, surface,
EV_RECENT_VIEW_JOB_COLUMN, NULL,
-1);
if (path != NULL) {
gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->model), &iter, path);
gtk_tree_path_free (path);
gtk_list_store_set (priv->model, &iter,
GD_MAIN_COLUMN_ICON, surface,
EV_RECENT_VIEW_JOB_COLUMN, NULL,
-1);
}
cairo_surface_destroy (surface);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment