Prevent NPE
This commit is contained in:
parent
3bc53544a2
commit
76d267dce4
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ public class InsertCannulaAction implements OmnipodAction<StatusResponse> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StatusResponse execute(OmnipodCommunicationManager communicationService) {
|
public StatusResponse execute(OmnipodCommunicationManager communicationService) {
|
||||||
if (podStateManager.getSetupProgress().isBefore(SetupProgress.PRIMING_FINISHED)) {
|
if (!podStateManager.isPaired() || podStateManager.getSetupProgress().isBefore(SetupProgress.PRIMING_FINISHED)) {
|
||||||
throw new IllegalSetupProgressException(SetupProgress.PRIMING_FINISHED, podStateManager.getSetupProgress());
|
throw new IllegalSetupProgressException(SetupProgress.PRIMING_FINISHED, podStateManager.getSetupProgress());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue