if (dir && *dir) {
gtk_file_chooser_set_current_folder_uri(GTK_FILE_CHOOSER(dialog), *dir);
} else {
- gtk_file_chooser_set_current_folder_uri(GTK_FILE_CHOOSER(dialog), g_get_home_dir());
+ const gchar *home;
+
+ home=g_get_home_dir();
+ if (home)
+ gtk_file_chooser_set_current_folder_uri(GTK_FILE_CHOOSER(dialog), home);
}
*new_file=NULL;
if (gtk_dialog_run(GTK_DIALOG(dialog))==GTK_RESPONSE_OK) {
/* Get the selected filename. */
*new_file = gtk_file_chooser_get_uri(GTK_FILE_CHOOSER(dialog));
- g_printf("file: %s\n", *new_file);
success=TRUE;
}
if (dir && *dir) {
gtk_file_chooser_set_current_folder_uri(GTK_FILE_CHOOSER(dialog), *dir);
} else {
- gtk_file_chooser_set_current_folder_uri(GTK_FILE_CHOOSER(dialog), g_get_home_dir());
+ const gchar *home;
+
+ home=g_get_home_dir();
+ if (home)
+ gtk_file_chooser_set_current_folder_uri(GTK_FILE_CHOOSER(dialog), home);
}
if (file && *file) {