Skip to content

Commit 6edc0fc

Browse files
authored
Defend against null AbstractFolder.primaryView (#447)
2 parents 917eb99 + d3d9a27 commit 6edc0fc

File tree

1 file changed

+6
-3
lines changed
  • src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder

1 file changed

+6
-3
lines changed

src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/sidepanel.jelly

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@ THE SOFTWARE.
2323
-->
2424
<?jelly escape-by-default='true'?>
2525
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler">
26-
<j:if test="${view == null}"> <!-- true when rendering from ModelObjectWithContextMenu.ContextMenu.from -->
27-
<j:set var="view" value="${it.primaryView}"/>
26+
<j:set var="primaryView" value="${it.primaryView}"/>
27+
<j:if test="${primaryView != null}">
28+
<j:if test="${view == null}"> <!-- true when rendering from ModelObjectWithContextMenu.ContextMenu.from -->
29+
<j:set var="view" value="${primaryView}"/>
30+
</j:if>
31+
<st:include it="${primaryView}" page="sidepanel.jelly"/>
2832
</j:if>
29-
<st:include it="${it.primaryView}" page="sidepanel.jelly"/>
3033
</j:jelly>

0 commit comments

Comments
 (0)