diff options
author | Thomas White <taw@bitwiz.org.uk> | 2018-03-07 13:00:55 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2018-03-07 13:00:55 +0100 |
commit | 8fb0c2bd7c8308914f8ad2cd052bf247e47efec5 (patch) | |
tree | 2244e7ca09090878db951a39f4de81d6bc79f30a /src | |
parent | 6429ecd22f5f002c5323f152c9d395ee9cad55e5 (diff) |
Add a warning
Diffstat (limited to 'src')
-rw-r--r-- | src/frame.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/frame.c b/src/frame.c index eaa4f41..af95767 100644 --- a/src/frame.c +++ b/src/frame.c @@ -965,6 +965,11 @@ size_t pos_trail_to_offset(Paragraph *para, size_t offs, int trail) return 0; } + if ( para->n_runs == 0 ) { + fprintf(stderr, "pos_trail_to_offset: No runs\n"); + return 0; + } + run = ¶->runs[nrun]; if ( para->type != PARA_TYPE_TEXT ) return 0; |