diff --git a/tests/src/core/testqgsmeshlayer.cpp b/tests/src/core/testqgsmeshlayer.cpp index 7b1e8980ab99..2ec1da0b630f 100644 --- a/tests/src/core/testqgsmeshlayer.cpp +++ b/tests/src/core/testqgsmeshlayer.cpp @@ -2423,10 +2423,17 @@ void TestQgsMeshLayer::testMinimumMaximumActiveScalarDataset() QStringLiteral( "mdal" ) ); QVERIFY( layer.isValid() ); - layer.updateTriangularMesh(); datasetIndex = QgsMeshDatasetIndex( 0, 0 ); + // if triangular mesh does not exist cannot extract values + extent = layer.extent(); + found = layer.minimumMaximumActiveScalarDataset( extent, datasetIndex, min, max ); + QCOMPARE( found, false ); + + // crete triangular mesh for layer + layer.updateTriangularMesh(); + // tests for basic dataset extent = layer.extent(); found = layer.minimumMaximumActiveScalarDataset( extent, datasetIndex, min, max );