Skip to content

Commit 095f803

Browse files
author
gbonnary
committed
Fix issue if no positions in PhaseLine determineLabelPositions method.
1 parent 2d1e121 commit 095f803

File tree

1 file changed

+5
-1
lines changed
  • src/gov/nasa/worldwind/symbology/milstd2525/graphics/lines

1 file changed

+5
-1
lines changed

src/gov/nasa/worldwind/symbology/milstd2525/graphics/lines/PhaseLine.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,11 @@ protected void createLabels()
186186
@Override
187187
protected void determineLabelPositions(DrawContext dc)
188188
{
189-
Iterator<? extends Position> iterator = this.path.getPositions().iterator();
189+
Iterable<? extends Position> positions = this.path.getPositions();
190+
if (positions == null)
191+
return;
192+
193+
Iterator<? extends Position> iterator = positions.iterator();
190194

191195
// Find the first and last positions on the path
192196
Position first = iterator.next();

0 commit comments

Comments
 (0)