# HG changeset patch # User Stefan Monnier # Date 1191359139 0 # Node ID ad5045db16f78278de0a07b123f8a3ba3b96af1e # Parent 92fa2952cd73d71e21e837c9a5f4bdf9b83e29c4 (Fmarker_buffer): Make test for odd case into a failure. diff -r 92fa2952cd73 -r ad5045db16f7 src/marker.c --- a/src/marker.c Tue Oct 02 21:03:04 2007 +0000 +++ b/src/marker.c Tue Oct 02 21:05:39 2007 +0000 @@ -452,9 +452,12 @@ 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; }