mirror of
https://github.com/PCSX2/pcsx2.git
synced 2025-12-16 04:08:48 +00:00
Qt: Don't detach surface from container when deleting the surface
This commit is contained in:
parent
9aabb197e6
commit
5476c5a17f
@ -2502,9 +2502,6 @@ void MainWindow::destroyDisplayWidget(bool show_game_list)
|
||||
if (!isRenderingFullscreen() && !isRenderingToMain())
|
||||
saveDisplayWindowGeometryToConfig();
|
||||
|
||||
// Detatch display surface from container.
|
||||
m_display_surface->setParent(nullptr);
|
||||
|
||||
if (isRenderingToMain())
|
||||
{
|
||||
pxAssertRel(m_ui.mainContainer->indexOf(m_display_container) == 1, "Display widget in stack");
|
||||
@ -2516,17 +2513,12 @@ void MainWindow::destroyDisplayWidget(bool show_game_list)
|
||||
}
|
||||
}
|
||||
|
||||
if (m_display_surface)
|
||||
{
|
||||
m_display_surface->destroy();
|
||||
m_display_surface = nullptr;
|
||||
}
|
||||
|
||||
if (m_display_container)
|
||||
{
|
||||
m_display_container->deleteLater();
|
||||
m_display_container = nullptr;
|
||||
}
|
||||
// displau surface is always in a container
|
||||
pxAssert(m_display_container != nullptr);
|
||||
m_display_container->deleteLater();
|
||||
m_display_container = nullptr;
|
||||
// m_display_surface will be destroyed by the container's dtor
|
||||
m_display_surface = nullptr;
|
||||
|
||||
updateDisplayRelatedActions(false, false, false);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user