diff --git a/src/nano.c b/src/nano.c
index b454c3f6f7cfc5d8eaa33d2139f4edc842b32ad6..116d5ad800b639fba0035a7f53d71fbc3056f4ea 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -621,7 +621,7 @@ partition *partition_filestruct(filestruct *top, size_t top_x,
 	filestruct *bot, size_t bot_x)
 {
     partition *p;
-    assert(top != NULL && bot != NULL);
+    assert(top != NULL && bot != NULL && fileage != NULL && filebot != NULL);
 
     /* Initialize the partition. */
     p = (partition *)nmalloc(sizeof(partition));