Don't try to insert text if cursor_frame=NULL
authorThomas White <taw@physics.org>
Thu, 29 Mar 2018 21:14:41 +0000 (23:14 +0200)
committerThomas White <taw@physics.org>
Thu, 29 Mar 2018 21:14:41 +0000 (23:14 +0200)
src/sc_editor.c

index 27aeb3a..5fdcc07 100644 (file)
@@ -770,6 +770,8 @@ static void insert_text(char *t, SCEditor *e)
 {
        Paragraph *para;
 
+       if ( e->cursor_frame == NULL ) return;
+
        if ( e->sel_active ) {
                do_backspace(e->cursor_frame, e);
        }