summaryrefslogtreecommitdiff
path: root/src/marker.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-10-11 16:24:58 +0000
committerMiles Bader <miles@gnu.org>2007-10-11 16:24:58 +0000
commitc73bd236f75b742ad4642ec94798987ae6e3e1e8 (patch)
treeef5edc8db557fc1d25a17c379e4ae63a38b3ba5c /src/marker.c
parentecb21060d5c1752d41d7a742be565c59b5fcb855 (diff)
parent58ade22bf16a9ec2ff0aee6c59d8db4d1703e94f (diff)
downloademacs-c73bd236f75b742ad4642ec94798987ae6e3e1e8.tar.gz
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 866-879) - Merge multi-tty branch - Update from CVS - Merge from emacs--rel--22 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-257
Diffstat (limited to 'src/marker.c')
-rw-r--r--src/marker.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/marker.c b/src/marker.c
index 6a7652c8ce9..d054ef91e79 100644
--- a/src/marker.c
+++ b/src/marker.c
@@ -452,9 +452,12 @@ Returns nil if MARKER points into a dead buffer. */)
if (XMARKER (marker)->buffer)
{
XSETBUFFER (buf, XMARKER (marker)->buffer);
- /* Return marker's buffer only if it is not dead. */
- if (!NILP (XBUFFER (buf)->name))
- return buf;
+ /* If the buffer is dead, we're in trouble: the buffer pointer here
+ does not preserve the buffer from being GC'd (it's weak), so
+ markers have to be unlinked from their buffer as soon as the buffer
+ is killed. */
+ eassert (!NILP (XBUFFER (buf)->name));
+ return buf;
}
return Qnil;
}