Skip to content

Commit

Permalink
Fix NPE for GenericContainer::isRunning (testcontainers#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin Prokopchik authored and Konstantin Prokopchik committed Jul 19, 2017
1 parent d7710b9 commit a5ebbb0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ public String getIpAddress() {
@Override
public Boolean isRunning() {
try {
return dockerClient.inspectContainerCmd(containerId).exec().getState().getRunning();
return containerId != null && dockerClient.inspectContainerCmd(containerId).exec().getState().getRunning();
} catch (DockerException e) {
return false;
}
Expand Down

0 comments on commit a5ebbb0

Please sign in to comment.