Преглед на файлове

core: Don't shutdown a null GPU

When CreateGPU fails, yuzu would try and shutdown the GPU instance
regardless of whether any instance was actually created.

Check for nullptr before calling its methods to prevent a crash.
lat9nq преди 4 години
родител
ревизия
381f1dd2c9
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      src/core/core.cpp

+ 3 - 1
src/core/core.cpp

@@ -326,7 +326,9 @@ struct System::Impl {
         is_powered_on = false;
         exit_lock = false;
 
-        gpu_core->NotifyShutdown();
+        if (gpu_core != nullptr) {
+            gpu_core->NotifyShutdown();
+        }
 
         services.reset();
         service_manager.reset();