[gnome-games] retro-runner: Don't try to check supports-snapshot after a crash



commit 8bade78073f44f906f0b608d04dfcfb3cf09fa88
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Dec 11 22:47:48 2020 +0500

    retro-runner: Don't try to check supports-snapshot after a crash
    
    We'll cause the core to crash again, and there's just no point anyway.

 src/retro/retro-runner.vala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index 44fe9795..11891a8b 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -298,13 +298,13 @@ public class Games.RetroRunner : Object, Runner {
                if (!core_loaded)
                        return;
 
-               if (!supports_snapshots) {
+               if (!is_error && !supports_snapshots) {
                        try {
                                var path = get_fallback_save_directory_path ();
 
                                if (core.get_memory_size (Retro.MemoryType.SAVE_RAM) > 0)
                                        core.save_memory (Retro.MemoryType.SAVE_RAM,
-                                                             Path.build_filename (path, "save"));
+                                                         Path.build_filename (path, "save"));
 
                                var tmp_dir = File.new_for_path (tmp_save_dir);
                                var dest_dir = File.new_for_path (Path.build_filename (path, "save-dir"));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]