diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/marker.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/marker.c b/src/marker.c index a57dafa3f3b..0c89f71d79a 100644 --- a/src/marker.c +++ b/src/marker.c | |||
| @@ -452,9 +452,12 @@ Returns nil if MARKER points into a dead buffer. */) | |||
| 452 | if (XMARKER (marker)->buffer) | 452 | if (XMARKER (marker)->buffer) |
| 453 | { | 453 | { |
| 454 | XSETBUFFER (buf, XMARKER (marker)->buffer); | 454 | XSETBUFFER (buf, XMARKER (marker)->buffer); |
| 455 | /* Return marker's buffer only if it is not dead. */ | 455 | /* If the buffer is dead, we're in trouble: the buffer pointer here |
| 456 | if (!NILP (XBUFFER (buf)->name)) | 456 | does not preserve the buffer from being GC'd (it's weak), so |
| 457 | return buf; | 457 | markers have to be unlinked from their buffer as soon as the buffer |
| 458 | is killed. */ | ||
| 459 | eassert (!NILP (XBUFFER (buf)->name)); | ||
| 460 | return buf; | ||
| 458 | } | 461 | } |
| 459 | return Qnil; | 462 | return Qnil; |
| 460 | } | 463 | } |