aboutsummaryrefslogtreecommitdiff
path: root/src/frame.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2017-03-02 22:40:58 +0100
committerThomas White <taw@bitwiz.org.uk>2017-03-02 22:45:07 +0100
commite7eede3273394f3479bb63f92e57780dfc8f2e3d (patch)
treead8467da22a4c1f2cdca113b77f096e5e643b98b /src/frame.c
parent397fbd7032b57fec6aee9b8eac4ccf693aedc63a (diff)
sc_block_delete() may change the top block
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/frame.c b/src/frame.c
index 36a7983..5a7da8e 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1021,7 +1021,9 @@ void merge_paragraphs(struct frame *fr, int para)
const char *c = sc_block_contents(n);
if ( strlen(c) == 1 ) {
- sc_block_delete(scblock, n);
+ SCBlock *ss = scblock;
+ sc_block_delete(&scblock, n);
+ assert(ss == scblock);
} else {
scblock_delete_text(n, 0, 1);
}