Author: kelnos Date: 2009-02-02 06:29:25 +0000 (Mon, 02 Feb 2009) New Revision: 29430
Modified: xfdesktop/trunk/NEWS xfdesktop/trunk/panel-plugin/desktop-menu-plugin.c Log: don't use the custom menu file name if it's not valid (bug 4879) Modified: xfdesktop/trunk/NEWS =================================================================== --- xfdesktop/trunk/NEWS 2009-02-02 06:11:53 UTC (rev 29429) +++ xfdesktop/trunk/NEWS 2009-02-02 06:29:25 UTC (rev 29430) @@ -1,3 +1,8 @@ +Xfce 4.6rc2 (Xfce 4.5.99.2): + + * Fix menu plugin crash when selecting custom menu file (bug 4879). + + Xfce 4.6rc1 (Xfce 4.5.99.1): ---------------------------- Modified: xfdesktop/trunk/panel-plugin/desktop-menu-plugin.c =================================================================== --- xfdesktop/trunk/panel-plugin/desktop-menu-plugin.c 2009-02-02 06:11:53 UTC (rev 29429) +++ xfdesktop/trunk/panel-plugin/desktop-menu-plugin.c 2009-02-02 06:29:25 UTC (rev 29430) @@ -522,6 +522,11 @@ g_free(dmp->menu_file); dmp->menu_file = gtk_file_chooser_get_filename(fc); + if(!dmp->menu_file|| !g_file_test(dmp->menu_file, G_FILE_TEST_EXISTS)) { + g_free(dmp->menu_file); + dmp->menu_file = NULL; + return; + } if(dmp->desktop_menu) { const gchar *cur_file = xfce_desktop_menu_get_menu_file(dmp->desktop_menu); @@ -594,7 +599,7 @@ hbox = g_object_get_data(G_OBJECT(tb), "dmp-child-hbox"); gtk_widget_set_sensitive(hbox, TRUE); - if(dmp->menu_file) { + if(dmp->menu_file && g_file_test(dmp->menu_file, G_FILE_TEST_EXISTS)) { if(dmp->desktop_menu) xfce_desktop_menu_destroy(dmp->desktop_menu); dmp->desktop_menu = xfce_desktop_menu_new(dmp->menu_file, TRUE); _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits