diff --git a/src/storm/storage/SparseMatrix.cpp b/src/storm/storage/SparseMatrix.cpp index 360e68ee8..ecf29de4a 100644 --- a/src/storm/storage/SparseMatrix.cpp +++ b/src/storm/storage/SparseMatrix.cpp @@ -1205,7 +1205,9 @@ namespace storm { } // Finally create matrix and return result. auto result = matrixBuilder.build(); - result.setRowGroupIndices(this->rowGroupIndices.get()); + if (this->rowGroupIndices) { + result.setRowGroupIndices(this->rowGroupIndices.get()); + } return result; }