aboutsummaryrefslogtreecommitdiff
path: root/src/sc_editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sc_editor.c')
-rw-r--r--src/sc_editor.c2
1 files changed, 2 insertions, 0 deletions
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);