[PATCH] thunar-vcs-plugin: fix crash during svn log

Stefan Sperling stsp at stsp.name
Wed Aug 22 13:36:51 CEST 2012


Fix a crash in tsh_tree_get_iter_for_path().

Don't add items with NULL paths to the tree model.
Fixes crashes observed while browsing log history.

To reproduce, try browsing http://subclipse.tigris.org/svn/subclipse/trunk
(login as "guest", empty password), wait for all revisions to download,
select revision 1 and then move upwards using the 'up' arrrow key on the
keyboard. It crashes somewhere between r6 and r10.

diff --git a/tvp-svn-helper/tsh-tree-common.c b/tvp-svn-helper/tsh-tree-common.c
index 31484f0..fbd2905 100644
--- a/tvp-svn-helper/tsh-tree-common.c
+++ b/tvp-svn-helper/tsh-tree-common.c
@@ -243,7 +243,10 @@ tsh_tree_get_iter_for_path (GtkTreeStore *model, const gchar *file, GtkTreeIter
     }
   }
 
-  gtk_tree_store_append (model, iter, parent);
-  gtk_tree_store_set (model, iter, path_column, relative_file, -1);
+  if (relative_file)
+  {
+    gtk_tree_store_append (model, iter, parent);
+    gtk_tree_store_set (model, iter, path_column, relative_file, -1);
+  }
 }
 


More information about the Xfce4-dev mailing list