summaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorGravatar lat9nq2022-03-07 01:39:16 -0500
committerGravatar lat9nq2022-03-07 15:25:20 -0500
commit381f1dd2c993847fdef65b2c9da4c7ec29079553 (patch)
tree80943b6d490d7e99ae71681555ec89d44829cdb5 /src/core/core.cpp
parentgl_graphics_pipeline: Improve shader builder synchronization using fences (#7... (diff)
downloadyuzu-381f1dd2c993847fdef65b2c9da4c7ec29079553.tar.gz
yuzu-381f1dd2c993847fdef65b2c9da4c7ec29079553.tar.xz
yuzu-381f1dd2c993847fdef65b2c9da4c7ec29079553.zip
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.
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index b0cfee3ee..c60a784c3 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -326,7 +326,9 @@ struct System::Impl {
326 is_powered_on = false; 326 is_powered_on = false;
327 exit_lock = false; 327 exit_lock = false;
328 328
329 gpu_core->NotifyShutdown(); 329 if (gpu_core != nullptr) {
330 gpu_core->NotifyShutdown();
331 }
330 332
331 services.reset(); 333 services.reset();
332 service_manager.reset(); 334 service_manager.reset();