NO-JIRA avoiding possible NPE on SharedNothingBackupActivation

This commit is contained in:
Clebert Suconic 2018-05-08 18:40:49 -04:00
parent 845f03dce3
commit eaf935ecec
1 changed files with 3 additions and 1 deletions

View File

@ -220,12 +220,14 @@ public final class SharedNothingBackupActivation extends Activation {
clusterControl = clusterController.connectToNodeInReplicatedCluster(possibleLive.getA());
} catch (Exception e) {
logger.debug(e.getMessage(), e);
if (possibleLive.getB() != null) {
if (possibleLive != null && possibleLive.getB() != null) {
try {
clusterControl = clusterController.connectToNodeInReplicatedCluster(possibleLive.getB());
} catch (Exception e1) {
clusterControl = null;
}
} else {
clusterControl = null;
}
}
if (clusterControl == null) {