forked from j62/ctbrec
1
0
Fork 0

Avoid NPE when is not yet loaded

This commit is contained in:
0xboobface 2018-12-13 15:21:31 +01:00
parent fb54f464ab
commit 10c0728e05
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ public abstract class AbstractFileSelectionBox extends HBox {
validationError.setText(msg);
fileInput.setTooltip(validationError);
Point2D p = fileInput.localToScreen(fileInput.getTranslateY(), fileInput.getTranslateY());
if(!validationError.isShowing()) {
if(!validationError.isShowing() && getScene() != null) {
validationError.show(getScene().getWindow(), p.getX(), p.getY() + fileInput.getHeight() + 4);
}
} else {