From a64be6aa2773c4e410086aee986f6e7a29ebf40e Mon Sep 17 00:00:00 2001 From: gnaegi <none@none> Date: Wed, 18 May 2016 15:30:26 +0200 Subject: [PATCH] OO-725 fix npe when video configured with rating but no comments --- .../org/olat/modules/video/ui/VideoDisplayController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/olat/modules/video/ui/VideoDisplayController.java b/src/main/java/org/olat/modules/video/ui/VideoDisplayController.java index 94176dcfff3..e7375986749 100644 --- a/src/main/java/org/olat/modules/video/ui/VideoDisplayController.java +++ b/src/main/java/org/olat/modules/video/ui/VideoDisplayController.java @@ -127,7 +127,9 @@ public class VideoDisplayController extends BasicController { if ((showComments || showRating) && !ureq.getUserSession().getRoles().isGuestOnly()) { CommentAndRatingSecurityCallback ratingSecCallback = new CommentAndRatingDefaultSecurityCallback(getIdentity(), false, false); commentsAndRatingCtr = new UserCommentsAndRatingsController(ureq, getWindowControl(),entry.getOlatResource(), OresSubPath , ratingSecCallback,showComments, showRating, true); - commentsAndRatingCtr.expandComments(ureq); + if (showComments) { + commentsAndRatingCtr.expandComments(ureq); + } listenTo(commentsAndRatingCtr); mainVC.put("commentsAndRating", commentsAndRatingCtr.getInitialComponent()); } -- GitLab