diff options
Diffstat (limited to 'src/sc_editor.c')
-rw-r--r-- | src/sc_editor.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sc_editor.c b/src/sc_editor.c index 72e90e8..ca37853 100644 --- a/src/sc_editor.c +++ b/src/sc_editor.c @@ -583,6 +583,11 @@ static void insert_text(char *t, SCEditor *e) { Paragraph *para; + if ( e->cursor_frame == NULL ) { + fprintf(stderr, "Inserting text into no frame.\n"); + return; + } + if ( e->cursor_para >= e->cursor_frame->n_paras ) { fprintf(stderr, "Cursor paragraph number is too high!\n"); return; |