diff --git a/src/cut.c b/src/cut.c
index 4b45830057dd812180c72bef4434d7b570175c3c..e3ca576e4bd29a6f4da14e406b6856cccc65523f 100644
--- a/src/cut.c
+++ b/src/cut.c
@@ -161,14 +161,15 @@ void do_cut_text(
 	cut_line();
 
 #ifndef NANO_TINY
-    if (copy_text)
+    if (copy_text) {
 	/* Copy the text in the cutbuffer, starting at its saved end if
 	 * there is one, back into the filestruct.  This effectively
 	 * uncuts the text we just cut without marking the file as
 	 * modified. */
-	copy_from_filestruct((cb_save != NULL) ? cb_save : cutbuffer,
-		cutbottom);
-    else
+	if (cutbuffer != NULL)
+	    copy_from_filestruct((cb_save != NULL) ? cb_save :
+		cutbuffer, cutbottom);
+    } else
 #endif
 	/* Leave the text in the cutbuffer, and mark the file as
 	 * modified. */