diff options
Diffstat (limited to 'games/snes9x/snes9x-fix-crash.patch')
-rw-r--r-- | games/snes9x/snes9x-fix-crash.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/games/snes9x/snes9x-fix-crash.patch b/games/snes9x/snes9x-fix-crash.patch new file mode 100644 index 0000000000000..95ed192e0db42 --- /dev/null +++ b/games/snes9x/snes9x-fix-crash.patch @@ -0,0 +1,30 @@ +From 6d74746342a73cf65db215f4fdecdfb0cae66792 Mon Sep 17 00:00:00 2001 +From: Brandon Wright <bearoso@gmail.com> +Date: Mon, 10 Feb 2014 16:28:05 -0600 +Subject: [PATCH] Fix bug caused by virtual directories. + +--- + gtk/src/gtk_file.cpp | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/gtk/src/gtk_file.cpp b/gtk/src/gtk_file.cpp +index a0df75d..9c0e000 100644 +--- a/gtk/src/gtk_file.cpp ++++ b/gtk/src/gtk_file.cpp +@@ -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 +-- +1.9.3 + |