Created
February 10, 2014 00:42
-
-
Save anonymous/8908390 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/gtk/src/gtk_file.cpp b/gtk/src/gtk_file.cpp | |
index 0610d43..9e95f28 100644 | |
--- a/gtk/src/gtk_file.cpp | |
+++ b/gtk/src/gtk_file.cpp | |
@@ -470,8 +470,10 @@ 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment