Add null check

This commit is contained in:
Manfred Karrer 2019-01-06 13:05:46 +01:00
parent 3c08a2739f
commit 1c14b07fa1
No known key found for this signature in database
GPG Key ID: 401250966A6B2C46

View File

@ -1317,13 +1317,15 @@ public class TraderDisputeView extends ActivatableView<VBox, Void> {
if (item != null && !empty) {
listener = (observable, oldValue, newValue) -> {
setText(newValue ? Res.get("support.closed") : Res.get("support.open"));
getTableRow().setOpacity(newValue ? 0.4 : 1);
if (getTableRow() != null)
getTableRow().setOpacity(newValue ? 0.4 : 1);
};
closedProperty = item.isClosedProperty();
closedProperty.addListener(listener);
boolean isClosed = item.isClosed();
setText(isClosed ? Res.get("support.closed") : Res.get("support.open"));
getTableRow().setOpacity(isClosed ? 0.4 : 1);
if (getTableRow() != null)
getTableRow().setOpacity(isClosed ? 0.4 : 1);
} else {
if (closedProperty != null) {
closedProperty.removeListener(listener);