1
0
mirror of https://github.com/aNNiMON/HotaruFX.git synced 2024-09-19 14:14:21 +03:00

Add checks for composition exists

This commit is contained in:
Victor 2017-09-06 15:29:10 +03:00
parent cd0385e74d
commit f9e1e6909e

View File

@ -116,6 +116,11 @@ public class EditorController implements Initializable, DocumentListener {
val stage = new Stage(); val stage = new Stage();
val composition = context.composition(); val composition = context.composition();
if (composition == null) {
logError("There is no composition.\nMake sure you call composition method.");
logPane.setExpanded(true);
return;
}
stage.setScene(composition.produceAnimationScene()); stage.setScene(composition.produceAnimationScene());
composition.getTimeline().getFxTimeline().play(); composition.getTimeline().getFxTimeline().play();
stage.show(); stage.show();