mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-26 17:50:06 +00:00
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.
This commit is contained in:
parent
370e480c8c
commit
381f1dd2c9
@ -326,7 +326,9 @@ struct System::Impl {
|
|||||||
is_powered_on = false;
|
is_powered_on = false;
|
||||||
exit_lock = false;
|
exit_lock = false;
|
||||||
|
|
||||||
|
if (gpu_core != nullptr) {
|
||||||
gpu_core->NotifyShutdown();
|
gpu_core->NotifyShutdown();
|
||||||
|
}
|
||||||
|
|
||||||
services.reset();
|
services.reset();
|
||||||
service_manager.reset();
|
service_manager.reset();
|
||||||
|
Loading…
Reference in New Issue
Block a user