Skip to content

Commit

Permalink
Merge pull request #2020 from lf-lang/diagram-bodyless
Browse files Browse the repository at this point in the history
Avoid null pointer exception in diagrams with bodyless reactions
  • Loading branch information
lhstrh authored Sep 22, 2023
2 parents 50445fd + 52180e2 commit 0d89589
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ public KPolygon addReactionFigure(KNode node, ReactionInstance reaction) {
// optional code content
boolean hasCode =
getBooleanValue(LinguaFrancaSynthesis.SHOW_REACTION_CODE)
&& reaction.getDefinition().getCode() != null
&& !StringExtensions.isNullOrEmpty(reaction.getDefinition().getCode().getBody());
if (hasCode) {
KText hasCodeText =
Expand Down

0 comments on commit 0d89589

Please sign in to comment.