From 9e13f42a034ead3adaf3bcbc9bbd5f9176baf0b5 Mon Sep 17 00:00:00 2001
From: Sebastian Junges <sebastian.junges@rwth-aachen.de>
Date: Fri, 7 Feb 2020 15:57:00 +0100
Subject: [PATCH] fix in permute when no rowgroupindices where given

---
 src/storm/storage/SparseMatrix.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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;
         }