Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Safer workflow when checking for OpenCL
  • Loading branch information
github-actions[bot] authored and nyalldawson committed Apr 30, 2020
1 parent d08cbe8 commit 985dba3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/qgsoptions.cpp
Expand Up @@ -1152,8 +1152,13 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
{
if ( checked )
{
// Since this may crash and lock users out of the settings, let's disable opencl setting before entering
// and restore after available was successfully called
const bool openClStatus { QgsOpenClUtils::enabled() };
QgsOpenClUtils::setEnabled( false );
if ( QgsOpenClUtils::available( ) )
{
QgsOpenClUtils::setEnabled( openClStatus );
mOpenClContainerWidget->setEnabled( true );
mOpenClDevicesCombo->clear();

Expand Down

0 comments on commit 985dba3

Please sign in to comment.