aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-03-29 23:14:41 +0200
committerThomas White <taw@physics.org>2018-03-29 23:14:41 +0200
commit65446ad85962bc79620026d50d8ad26954ced041 (patch)
tree3c3c1da451bbdaa05d407d3151c0e7ea03d70188
parent957ef7fab089551162e78d79cb8b36de7c693f9e (diff)
Don't try to insert text if cursor_frame=NULL
-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 27aeb3a..5fdcc07 100644
--- a/src/sc_editor.c
+++ b/src/sc_editor.c
@@ -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);
}