[Xfce4-commits] r29869 - in thunar/branches/migration-to-gio: . thunar
Jannis Pohlmann
jannis at xfce.org
Mon Apr 20 20:07:26 CEST 2009
Author: jannis
Date: 2009-04-20 18:07:26 +0000 (Mon, 20 Apr 2009)
New Revision: 29869
Modified:
thunar/branches/migration-to-gio/ChangeLog
thunar/branches/migration-to-gio/thunar/thunar-window.c
Log:
* thunar/thunar-window.c: Fix runtime error due to an NULL path being
passed to g_file_new_for_path() in
thunar_window_setup_user_dir_menu_entries().
Modified: thunar/branches/migration-to-gio/ChangeLog
===================================================================
--- thunar/branches/migration-to-gio/ChangeLog 2009-04-20 17:52:41 UTC (rev 29868)
+++ thunar/branches/migration-to-gio/ChangeLog 2009-04-20 18:07:26 UTC (rev 29869)
@@ -1,5 +1,11 @@
2009-04-20 Jannis Pohlmann <jannis at xfce.org>
+ * thunar/thunar-window.c: Fix runtime error due to an NULL path being
+ passed to g_file_new_for_path() in
+ thunar_window_setup_user_dir_menu_entries().
+
+2009-04-20 Jannis Pohlmann <jannis at xfce.org>
+
* thunar/thunar-chooser-dialog.c, thunar/thunar-deep-count-job.c,
thunar/thunar-job.c, thunar/thunar-preferences.c,
thunar/thunar-shortcuts-model.c, thunar/thunar-size-label.c: Fix
Modified: thunar/branches/migration-to-gio/thunar/thunar-window.c
===================================================================
--- thunar/branches/migration-to-gio/thunar/thunar-window.c 2009-04-20 17:52:41 UTC (rev 29868)
+++ thunar/branches/migration-to-gio/thunar/thunar-window.c 2009-04-20 18:07:26 UTC (rev 29869)
@@ -655,11 +655,13 @@
/* special case: got NULL for the templates dir. Force it to ~/Templates */
if (G_UNLIKELY (path == NULL && i == G_USER_DIRECTORY_TEMPLATES))
dir = g_file_resolve_relative_path (home_dir, _thunar_user_directory_names[i]);
+ else if (path != NULL)
+ dir = g_file_new_for_path (path);
else
- dir = g_file_new_for_path (path);
+ continue;
/* xdg user dirs pointing to $HOME must be considered disabled */
- if (G_LIKELY (!g_file_equal (dir, home_dir)))
+ if (G_LIKELY (path != NULL && !g_file_equal (dir, home_dir)))
{
/* menu entry label translation */
translation = dgettext (XDG_USER_DIRS_PACKAGE, (gchar *) _thunar_user_directory_names[i]);
More information about the Xfce4-commits
mailing list