GH-1854 prevent a crash if the instance is closed while the kill confirmation dialog is open
This commit is contained in:
parent
be53eb66f8
commit
910766458d
@ -1001,7 +1001,8 @@ bool MultiMC::kill(InstancePtr instance)
|
||||
return false;
|
||||
}
|
||||
auto & extras = m_instanceExtras[instance->id()];
|
||||
auto & controller = extras.controller;
|
||||
// NOTE: copy of the shared pointer keeps it alive
|
||||
auto controller = extras.controller;
|
||||
if(controller)
|
||||
{
|
||||
return controller->abort();
|
||||
|
@ -214,7 +214,7 @@ private:
|
||||
struct InstanceXtras
|
||||
{
|
||||
InstanceWindow * window = nullptr;
|
||||
unique_qobject_ptr<LaunchController> controller;
|
||||
shared_qobject_ptr<LaunchController> controller;
|
||||
};
|
||||
std::map<QString, InstanceXtras> m_instanceExtras;
|
||||
size_t m_openWindows = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user