Making shutdown clean.
This commit is contained in:
@@ -32,7 +32,9 @@ EmulatorWindow::EmulatorWindow(Emulator* emulator)
|
||||
loop_(ui::Loop::Create()),
|
||||
window_(ui::Window::Create(loop_.get(), kBaseTitle)) {}
|
||||
|
||||
EmulatorWindow::~EmulatorWindow() = default;
|
||||
EmulatorWindow::~EmulatorWindow() {
|
||||
loop_->PostSynchronous([this]() { window_.reset(); });
|
||||
}
|
||||
|
||||
std::unique_ptr<EmulatorWindow> EmulatorWindow::Create(Emulator* emulator) {
|
||||
std::unique_ptr<EmulatorWindow> emulator_window(new EmulatorWindow(emulator));
|
||||
|
||||
@@ -83,6 +83,8 @@ int xenia_main(std::vector<std::wstring>& args) {
|
||||
result = emulator->LaunchPath(abs_path);
|
||||
if (XFAILED(result)) {
|
||||
XELOGE("Failed to launch target: %.8X", result);
|
||||
emulator.reset();
|
||||
emulator_window.reset();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user