Fix error in place displayer when offset is outside valid range

Resolves #10493.
This commit is contained in:
Nick Hall 2018-03-21 20:43:13 +00:00
parent cec9f55769
commit 0d1aef889e

View File

@ -105,7 +105,10 @@ class PlaceDisplay:
if len(parts) == 1:
offset = _get_offset(parts[0], index)
if offset is not None:
places.append(all_places[offset])
try:
places.append(all_places[offset])
except IndexError:
pass
elif len(parts) == 2:
start = _get_offset(parts[0], index)
end = _get_offset(parts[1], index)