From a580905cd0584f539986c6273a8ddb01b2a8b8fc Mon Sep 17 00:00:00 2001 From: srosse <none@none> Date: Thu, 7 Jul 2016 17:21:15 +0200 Subject: [PATCH] OO-2092: check if the parent message exist, if not handle the error gracefully and reload the thread --- .../java/org/olat/modules/fo/ui/MessageListController.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/olat/modules/fo/ui/MessageListController.java b/src/main/java/org/olat/modules/fo/ui/MessageListController.java index 2cfddeb9774..9635e714dd1 100644 --- a/src/main/java/org/olat/modules/fo/ui/MessageListController.java +++ b/src/main/java/org/olat/modules/fo/ui/MessageListController.java @@ -871,6 +871,10 @@ public class MessageListController extends BasicController implements GenericEve if (foCallback.mayReplyMessage()) { Message newMessage = forumManager.createMessage(forum, getIdentity(), guestOnly); Message parentMessage = forumManager.getMessageById(parent.getKey()); + if(parentMessage == null) { + handleEditError(ureq); + return; + } String reString = ""; if(parent != null && parent.isThreadTop()) { -- GitLab