Skip to content

Commit

Permalink
Protection against null pointer exception.
Browse files Browse the repository at this point in the history
Shouldn't happen normally but it did happen to me while importing from
VCML. Probably some race condition during initialization.
All will be well once the initialization finishes.
  • Loading branch information
danv61 committed Feb 12, 2020
1 parent c65a9ef commit d53448a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -593,9 +593,9 @@ public Component getListCellRendererComponent(JList list, Object value, int inde
setText(str);
} else if(value == RateLawType.MichaelisMenten) {
String str = "<html>";
if(reactionRule.getStructure() instanceof Feature) {
if(reactionRule != null && reactionRule.getStructure() instanceof Feature) {
str += "Henri-Michaelis-Menten (Irreversible) ["+MICROMOLAR+"/s]";
} else if (reactionRule.getStructure() instanceof Membrane) {
} else if (reactionRule != null && reactionRule.getStructure() instanceof Membrane) {
str += "Henri-Michaelis-Menten (Irreversible) [molecules/("+SQUAREMICRON+" s)]";
}
str += "</html>";
Expand Down

0 comments on commit d53448a

Please sign in to comment.