diff --git a/src/main/java/ee/ut/dendroloj/Dendrologist.java b/src/main/java/ee/ut/dendroloj/Dendrologist.java index 8917986..4a2c54d 100644 --- a/src/main/java/ee/ut/dendroloj/Dendrologist.java +++ b/src/main/java/ee/ut/dendroloj/Dendrologist.java @@ -25,6 +25,9 @@ private Dendrologist() { * Default: {@code 1.0} */ public static void setUIScale(double uiScale) { + if (awake) { + throw new IllegalStateException("Cannot set UI scale after dendrologist has woken up"); + } Dendrologist.uiScale = uiScale; }