Skip to content

Commit

Permalink
Explicitly check for PropellerOptimizeInputFile being not null.
Browse files Browse the repository at this point in the history
During fastbuild, PropellerOptimizeInputFile does not exist and this can cause
null pointer exception.  Explicitly check if this exists before accessing its
members.

PiperOrigin-RevId: 357591297
  • Loading branch information
Googler authored and copybara-github committed Feb 15, 2021
1 parent 687bfe3 commit 968422d
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ public static CcToolchainVariables setupVariables(
}

if (featureConfiguration.isEnabled(CppRuleClasses.PROPELLER_OPTIMIZE)
&& fdoContext.getPropellerOptimizeInputFile() != null
&& fdoContext.getPropellerOptimizeInputFile().getLdArtifact() != null) {
buildVariables.addStringVariable(
PROPELLER_OPTIMIZE_LD_PATH.getVariableName(),
Expand Down

0 comments on commit 968422d

Please sign in to comment.