Fix bug caused by virtual directories.

This commit is contained in:
Brandon Wright 2014-02-10 16:28:05 -06:00
parent 7c39cc34ba
commit 6d74746342
1 changed files with 5 additions and 2 deletions

View File

@ -465,8 +465,11 @@ S9xOpenROMDialog (void)
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
directory =
gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (dialog));
strncpy (gui_config->last_directory, directory, PATH_MAX);
g_free (directory);
if (directory)
{
strncpy (gui_config->last_directory, directory, PATH_MAX);
g_free (directory);
}
}
else