reset it's buffer pointer to NULL (Bug#12652).
+2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * buffer.c (Fkill_buffer): When unchaining the marker,
+ reset it's buffer pointer to NULL (Bug#12652).
+
2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
Do not verify indirection counters of killed buffers (Bug#12579).
if (b->base_buffer)
{
- { /* Unchain all markers that belong to this indirect buffer.
- Don't unchain the markers that belong to the base buffer
- or its other indirect buffers. */
- struct Lisp_Marker **mp;
- for (mp = &BUF_MARKERS (b); *mp; )
- {
- struct Lisp_Marker *m = *mp;
- if (m->buffer == b)
+ /* Unchain all markers that belong to this indirect buffer.
+ Don't unchain the markers that belong to the base buffer
+ or its other indirect buffers. */
+ struct Lisp_Marker **mp = &BUF_MARKERS (b);
+ while ((m = *mp))
+ {
+ if (m->buffer == b)
+ {
+ m->buffer = NULL;
*mp = m->next;
- else
- mp = &m->next;
- }
- }
+ }
+ else
+ mp = &m->next;
+ }
}
else
{