Skip to content

Commit 468576a

Browse files
authored
Fixed TextFlow children concurrency access (#1142)
1 parent c33c7d2 commit 468576a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

richtextfx/src/main/java9/org/fxmisc/richtext/TextFlowLayout.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ int getLineCount() {
7575
double totLines = 0.0, prevMaxY = -1.0;
7676
int totCharSoFar = 0;
7777

78-
for ( Node n : flow.getChildren() ) if ( n.isManaged() ) {
78+
for ( Node n : flow.getChildrenUnmodifiable() ) if ( n.isManaged() ) {
7979

8080
Bounds nodeBounds = n.getBoundsInParent();
8181
int length = (n instanceof Text) ? ((Text) n).getText().length() : 1;

0 commit comments

Comments
 (0)