Merge pull request #6352 from Android-X13/npe-open-proposals

Prevent NPE in Open Proposals when last column is empty
This commit is contained in:
Christoph Atteneder 2022-09-21 10:10:44 +02:00 committed by GitHub
commit 3cc1517606
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -886,7 +886,8 @@ public class ProposalsView extends ActivatableView<GridPane, Void> implements Bs
};
}
});
column.setComparator(Comparator.comparing(item -> ((ProposalsListItem.IconButtonType) item.getIconButton().getUserData()).getTitle()));
column.setComparator(Comparator.comparing(item -> item.getIconButton().getUserData() != null ?
((ProposalsListItem.IconButtonType) item.getIconButton().getUserData()).getTitle() : ""));
tableView.getColumns().add(column);
lastColumn = column;
}