From 81b068ebc0841b9716543da99627092396ffa613 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 19 Nov 2017 17:43:40 +0100 Subject: Don't try to split in a NULL frame --- src/sc_editor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sc_editor.c b/src/sc_editor.c index cd1e8ba..3139294 100644 --- a/src/sc_editor.c +++ b/src/sc_editor.c @@ -634,6 +634,8 @@ SCBlock *split_paragraph_at_cursor(SCEditor *e) size_t offs; Paragraph *para; + if ( e->cursor_frame == NULL ) return NULL; + para = e->cursor_frame->paras[e->cursor_para]; offs = pos_trail_to_offset(para, e->cursor_pos, e->cursor_trail); return split_paragraph(e->cursor_frame, e->cursor_para, offs, e->pc); -- cgit v1.2.3