aboutsummaryrefslogtreecommitdiff
path: root/src/sc_editor.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2015-12-26 18:42:14 +0100
committerThomas White <taw@bitwiz.org.uk>2015-12-26 18:42:14 +0100
commit55a8c269d2e77f798f9ca55d7a4afb7a9f98a701 (patch)
treea4a68f8cc3987476b3dc36ef977482360a54dc49 /src/sc_editor.c
parent512a21e10151e4c694a1aa4f7dfe8faf7eec5e52 (diff)
Extra checks
Diffstat (limited to 'src/sc_editor.c')
-rw-r--r--src/sc_editor.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sc_editor.c b/src/sc_editor.c
index 463e090..4c0e58a 100644
--- a/src/sc_editor.c
+++ b/src/sc_editor.c
@@ -852,6 +852,12 @@ static void insert_text(char *t, SCEditor *e)
sbx = e->cursor_box;
sps = e->cursor_pos;
sbox = &e->cursor_frame->lines[sln].boxes[sbx];
+
+ if ( sbox->type == WRAP_BOX_NOTHING ) {
+ printf("Upgrading nothing box to Pango box\n");
+ return;
+ }
+
sseg = which_segment(sbox, sps, &err);
if ( err ) return;