Skip to content

Commit

Permalink
segfault fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benapetr committed Jul 28, 2024
1 parent 28ad9db commit d3a242b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ option(AUDIO "Enable audio backend" true)

if (QT6_BUILD)
set (QT5_BUILD false)
set (WEB_ENGINE true)
add_definitions( -DQT6_BUILD )
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE)
endif()
Expand Down
9 changes: 6 additions & 3 deletions src/huggle_ui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2559,9 +2559,12 @@ void MainWindow::ReloadInterface()
this->revertItems.clear();
this->actionKeys.clear();
// Direct delete seems to cause crash for some reasons
this->RevertSummaries->deleteLater();
this->WarnMenu->deleteLater();
this->RevertWarn->deleteLater();
if (this->RevertSummaries)
this->RevertSummaries->deleteLater();
if (this->WarnMenu)
this->WarnMenu->deleteLater();
if (this->RevertWarn)
this->RevertWarn->deleteLater();
this->ui->actionRequest_protection->setEnabled(conf->RFPP);
this->RevertSummaries = new QMenu(this);
this->WarnMenu = new QMenu(this);
Expand Down

0 comments on commit d3a242b

Please sign in to comment.