mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-16 11:48:36 +12:00
cleanup ptr
This commit is contained in:
parent
39c1dc0e03
commit
70305cfb04
1 changed files with 9 additions and 0 deletions
|
@ -598,6 +598,15 @@ memory_viewer_panel::memory_viewer_panel(QWidget* parent, std::shared_ptr<CPUDis
|
|||
|
||||
auto& fxo = g_fxo->get<memory_viewer_fxo>();
|
||||
fxo.last_opened = this;
|
||||
|
||||
connect(this, &memory_viewer_panel::destroyed, this, [this]()
|
||||
{
|
||||
if (auto fxo = g_fxo->try_get<memory_viewer_fxo>())
|
||||
{
|
||||
if (this == fxo->last_opened)
|
||||
fxo->last_opened = nullptr;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
memory_viewer_panel::~memory_viewer_panel()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue