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:
Edwin Kempin 2013-08-22 15:12:06 +02:00 committed by David Pursehouse
parent 1d947bf77c
commit 2116e9f4ce

View File

@ -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();
}
}
}
}