Fix possible NPE in LsUserRefs
If a RepositoryNotFoundException is thrown 'repo' may not be set. Change-Id: Ie405141117dd2941251ae176777f0c460ab518dd Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
parent
1d947bf77c
commit
2116e9f4ce
@ -109,7 +109,9 @@ public class LsUserRefs extends SshCommand {
|
||||
throw new UnloggedFailure("fatal: Error opening: '"
|
||||
+ projectControl.getProject().getNameKey());
|
||||
} finally {
|
||||
repo.close();
|
||||
if (repo != null) {
|
||||
repo.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user