Fix potential NPE on getting Markdown content
Change-Id: Ie245da271ad1e7c90b1fab46832f9ecc7b5d297a
| | |
| | |
|
| | | if (app().settings().getBoolean(Keys.web.summaryShowReadme, false)) {
|
| | | // show a readme on the summary page
|
| | | MarkupDocument markupDoc = null;
|
| | | RevCommit head = JGitUtils.getCommit(r, null);
|
| | | if (head != null) {
|
| | | MarkupProcessor processor = new MarkupProcessor(app().settings());
|
| | | MarkupDocument markupDoc = processor.getReadme(r, repositoryName, getBestCommitId(head));
|
| | | markupDoc = processor.getReadme(r, repositoryName, getBestCommitId(head));
|
| | | }
|
| | | if (markupDoc == null || markupDoc.markup == null) {
|
| | | add(new Label("readme").setVisible(false));
|
| | | } else {
|