diff --git a/src/main/java/edu/ntnu/idatt2001/group_30/paths/model/Story.java b/src/main/java/edu/ntnu/idatt2001/group_30/paths/model/Story.java index f4aca83f1e195637c426ebd7a7cf3698975cbae2..29c8a098a363ac5bb746467d960886828214a9cc 100644 --- a/src/main/java/edu/ntnu/idatt2001/group_30/paths/model/Story.java +++ b/src/main/java/edu/ntnu/idatt2001/group_30/paths/model/Story.java @@ -106,7 +106,7 @@ public class Story { * @param title The new title of the story, given as a {@code String}. */ public void setTitle(String title) { - if (title.isBlank()) throw new IllegalArgumentException( + if (title == null || title.isBlank()) throw new IllegalArgumentException( "Title cannot be blank, empty, or contain special characters." ); this.title = title;