]> code.delx.au - gnu-emacs/commitdiff
(Foverlay_put): Don't call redisplay_region if overlay has no buffer.
authorRichard M. Stallman <rms@gnu.org>
Tue, 16 Nov 1993 07:09:11 +0000 (07:09 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 16 Nov 1993 07:09:11 +0000 (07:09 +0000)
src/buffer.c

index 7095498c2e821db982ea41366f32ab672f8b082e..d4300e3b5ed20f6fb2952689b73cc3b9203be421 100644 (file)
@@ -1865,9 +1865,11 @@ DEFUN ("overlay-put", Foverlay_put, Soverlay_put, 3, 3, 0,
 
   CHECK_OVERLAY (overlay, 0);
 
-  redisplay_region (XMARKER (OVERLAY_START (overlay))->buffer,
-                   marker_position (OVERLAY_START (overlay)),
-                   marker_position (OVERLAY_END   (overlay)));
+  tail = Fmarker_buffer (OVERLAY_START (overlay));
+  if (! NILP (tail))
+    redisplay_region (XMARKER (OVERLAY_START (overlay))->buffer,
+                     marker_position (OVERLAY_START (overlay)),
+                     marker_position (OVERLAY_END   (overlay)));
   
   plist = Fcdr_safe (XCONS (overlay)->cdr);