Qt: Ensure game list refresh is cancelled before destroying

This commit is contained in:
Connor McLaughlin 2022-12-20 23:47:09 +10:00 committed by lightningterror
parent 3f4f9ad5f1
commit 6df0a315a9
1 changed files with 3 additions and 0 deletions

View File

@ -123,6 +123,9 @@ MainWindow::MainWindow()
MainWindow::~MainWindow()
{
// make sure the game list isn't refreshing, because it's on a separate thread
cancelGameListRefresh();
// we compare here, since recreate destroys the window later
if (g_main_window == this)
g_main_window = nullptr;