changeset 100295:2ddd196a711d

(Fbuffer_swap_text): Signal error if swapping a dead buffer.
author Chong Yidong <cyd@stupidchicken.com>
date Tue, 09 Dec 2008 23:08:05 +0000
parents 21d77f0ff75e
children f67927d143a8
files src/buffer.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/buffer.c	Tue Dec 09 23:07:56 2008 +0000
+++ b/src/buffer.c	Tue Dec 09 23:08:05 2008 +0000
@@ -2192,6 +2192,9 @@
   CHECK_BUFFER (buffer);
   other_buffer = XBUFFER (buffer);
 
+  if (NILP (other_buffer->name))
+    error ("Cannot swap a dead buffer's text");    
+
   /* Actually, it probably works just fine.
    * if (other_buffer == current_buffer)
    *   error ("Cannot swap a buffer's text with itself"); */