hle: services: Fix a crash with improper NVFlinger lifetime management. (#4977)

* hle: services: Fix a crash with improper NVFlinger lifetime management.

- This crash would happen when attempting to shutdown yuzu early on in boot.
This commit is contained in:
bunnei
2020-11-24 14:31:58 -08:00
committed by GitHub
parent fbda5e9ec9
commit 7791cc8c2e
17 changed files with 104 additions and 100 deletions

View File

@ -121,8 +121,7 @@ public:
class ISelfController final : public ServiceFramework<ISelfController> {
public:
explicit ISelfController(Core::System& system_,
std::shared_ptr<NVFlinger::NVFlinger> nvflinger_);
explicit ISelfController(Core::System& system_, NVFlinger::NVFlinger& nvflinger_);
~ISelfController() override;
private:
@ -156,7 +155,7 @@ private:
};
Core::System& system;
std::shared_ptr<NVFlinger::NVFlinger> nvflinger;
NVFlinger::NVFlinger& nvflinger;
Kernel::EventPair launchable_event;
Kernel::EventPair accumulated_suspended_tick_changed_event;
@ -332,7 +331,7 @@ public:
};
/// Registers all AM services with the specified service manager.
void InstallInterfaces(SM::ServiceManager& service_manager,
std::shared_ptr<NVFlinger::NVFlinger> nvflinger, Core::System& system);
void InstallInterfaces(SM::ServiceManager& service_manager, NVFlinger::NVFlinger& nvflinger,
Core::System& system);
} // namespace Service::AM