diff --git a/ChangeLog b/ChangeLog
index f701bb6253561e41f3d9bbed83adf0535d552f6b..4e2ff928a0dca200db3c96e9502227df94881197 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -47,7 +47,8 @@ CVS code -
 	  file.  Changes to cut_line(), cut_to_eol(), do_page_up(),
 	  do_page_down(), do_para_end(), do_next_word(), do_prev_word(),
 	  do_up(), do_down(), do_scroll_down(), do_right(), do_mouse(),
-	  do_gotolinecolumn(), do_delete(), and find_paragraph(). (DLR)
+	  do_gotolinecolumn(), do_delete(), begpar(), and
+	  find_paragraph(). (DLR)
 	- Add new -L/--nonewlines command line option, and new
 	  "nonewlines" rcfile option, to control whether nano adds
 	  magiclines to the ends of files.  Changes to read_file(),
@@ -105,6 +106,8 @@ CVS code -
   do_rcfile()
 	- Remove unneeded assert. (DLR)
 - text.c:
+  begpar()
+	- Return FALSE if foo is NULL, as inpar() does. (DLR)
   do_alt_speller()
 	- Move the code that replaces the text of the current file with
 	  the text of the spell-checked file into its own function,
diff --git a/src/text.c b/src/text.c
index 747752869d297c58c517d7301995f70cdf6202e0..42bd2d7a7a2a6d810a6511bd6432ed4ed3494c15 100644
--- a/src/text.c
+++ b/src/text.c
@@ -899,12 +899,13 @@ bool indents_match(const char *a_line, size_t a_indent, const char
  *   autoindent is turned on. */
 bool begpar(const filestruct *const foo)
 {
-    size_t quote_len;
-    size_t indent_len;
-    size_t temp_id_len;
+    size_t quote_len, indent_len, temp_id_len;
+
+    if (foo == NULL)
+	return FALSE;
 
     /* Case 1). */
-    if (foo->prev == NULL)
+    if (foo == openfile->fileage)
 	return TRUE;
 
     quote_len = quote_length(foo->data);