4ae008
--- src/libnrtype/Layout-TNG-OutIter.cpp~       2018-03-11 16:38:09.000000000 -0400
4ae008
+++ src/libnrtype/Layout-TNG-OutIter.cpp        2018-06-16 13:17:03.129605681 -0400
4ae008
@@ -182,6 +182,8 @@
4ae008
     if (_input_stream[source_index]->Type() != TEXT_SOURCE)
4ae008
         return iterator(this, char_index);
4ae008
4ae008
+    if (char_index >= _characters.size())
4ae008
+        return end();
4ae008
     return iterator(this, char_index);
4ae008
     /* This code was never used, the text_iterator argument was "NULL" in all calling code
4ae008
     InputStreamTextSource const *text_source = static_cast<InputStreamTextSource const *>(_input_stream[source_index]);
4ae008