changeset 9391:6061a432881f

(make_gap): Keep input blocked till after we set BEG_ADDR.
author Richard M. Stallman <rms@gnu.org>
date Fri, 07 Oct 1994 17:40:50 +0000
parents a7c6e2858f8b
children 32186e807f02
files src/insdel.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/insdel.c	Fri Oct 07 17:38:03 1994 +0000
+++ b/src/insdel.c	Fri Oct 07 17:40:50 1994 +0000
@@ -271,11 +271,16 @@
 
   BLOCK_INPUT;
   result = BUFFER_REALLOC (BEG_ADDR, (Z - BEG + GAP_SIZE + increment));
-  UNBLOCK_INPUT;
 
   if (result == 0)
-    memory_full ();
+    {
+      UNBLOCK_INPUT;
+      memory_full ();
+    }
+
+  /* We can't unblock until the new address is properly stored.  */
   BEG_ADDR = result;
+  UNBLOCK_INPUT;
 
   /* Prevent quitting in move_gap.  */
   tem = Vinhibit_quit;