diff options
author | Thomas White <taw@bitwiz.org.uk> | 2016-09-21 15:28:06 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2016-09-21 15:28:06 +0200 |
commit | 56b1ef0971f4b4bc3a732b632fee5cee00009631 (patch) | |
tree | 23cbac3f8566514795d0b964efb7bb78b60c5128 | |
parent | fed1bb69cd8aca704b5f0aa36dc2a90ff1e8c53a (diff) |
Fix segfault
-rw-r--r-- | src/sc_editor.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sc_editor.c b/src/sc_editor.c index 5aeb003..fd558be 100644 --- a/src/sc_editor.c +++ b/src/sc_editor.c @@ -608,6 +608,8 @@ static void check_cursor_visible(SCEditor *e) size_t offs; Paragraph *para; + if ( e->cursor_frame == NULL ) return; + para = e->cursor_frame->paras[e->cursor_para]; offs = pos_trail_to_offset(para, e->cursor_pos, e->cursor_trail); get_cursor_pos(e->cursor_frame, e->cursor_para, offs, &x, &y, &h); |