--- src/mpi/topo/topoutil.c	2021-10-29 01:44:19.670476792 +0200
+++ src/mpi/topo/topoutil.c	2021-10-29 01:46:49.741636305 +0200
@@ -161,10 +161,16 @@
     } else if (old_topology->kind == MPI_DIST_GRAPH) {
         copy_topology->topo.dist_graph.indegree = old_topology->topo.dist_graph.indegree;
         copy_topology->topo.dist_graph.outdegree = old_topology->topo.dist_graph.outdegree;
+        copy_topology->topo.dist_graph.is_weighted = old_topology->topo.dist_graph.is_weighted;
         MPIR_ARRAY_COPY_HELPER(dist_graph, in, indegree);
-        MPIR_ARRAY_COPY_HELPER(dist_graph, in_weights, indegree);
         MPIR_ARRAY_COPY_HELPER(dist_graph, out, outdegree);
-        MPIR_ARRAY_COPY_HELPER(dist_graph, out_weights, outdegree);
+        if (old_topology->topo.dist_graph.is_weighted) {
+          MPIR_ARRAY_COPY_HELPER(dist_graph, in_weights, indegree);
+          MPIR_ARRAY_COPY_HELPER(dist_graph, out_weights, outdegree);
+        } else {
+          copy_topology->topo.dist_graph.in_weights = NULL;
+          copy_topology->topo.dist_graph.out_weights = NULL;
+        }
     }
     /* --BEGIN ERROR HANDLING-- */
     else {
