diff --git a/src/space.c b/src/space.c
index f16d031b37026ff8b86a7329e67914d8d425b7fb..ec7676fb59f7217252a2f94301f126a3d387a2ec 100644
--- a/src/space.c
+++ b/src/space.c
@@ -3296,6 +3296,7 @@ void space_struct_restore(struct space *s, FILE *stream) {
 
   /* More things to read. */
   s->parts = NULL;
+  s->xparts = NULL;
   if (s->nr_parts > 0) {
 
     /* Need the memory for these. */