Skip to content

Commit

Permalink
[mesh] Fix jump on uninitialized value, causing flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 10, 2019
1 parent ce5841c commit 5ea5bc4
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/app/mesh/qgsmeshcalculatordialog.cpp
Expand Up @@ -249,11 +249,19 @@ void QgsMeshCalculatorDialog::updateInfoMessage()

// selected driver is appropriate
bool driverValid = false;
const QString driverKey = driver();
if ( mMeshDrivers.contains( driverKey ) )
if ( expressionValid )
{
const QgsMeshDriverMetadata meta = mMeshDrivers[driverKey];
driverValid = meta.capabilities().testFlag( requiredCapability );
const QString driverKey = driver();
if ( mMeshDrivers.contains( driverKey ) )
{
const QgsMeshDriverMetadata meta = mMeshDrivers[driverKey];
driverValid = meta.capabilities().testFlag( requiredCapability );
}
}
else
{
// can't determine if driver is valid when expression is invalid
driverValid = true;
}

// output path is selected
Expand Down

0 comments on commit 5ea5bc4

Please sign in to comment.