Mercurial annotations: fix NPE

This commit is contained in:
Kirill Likhodedov
2012-12-03 14:54:50 +04:00
parent 8778940b8e
commit d6a3fdaae2
@@ -49,7 +49,7 @@ public class HgAnnotationProvider implements AnnotationProvider {
final HgFile hgFile = new HgFile(vcsRoot, VfsUtil.virtualToIoFile(file));
final List<HgAnnotationLine> annotationResult = (new HgAnnotateCommand(myProject)).execute(hgFile, revision);
final List<HgFileRevision> logResult = (new HgLogCommand(myProject)).execute(hgFile, DEFAULT_LIMIT, false);
return new HgAnnotation(myProject, hgFile, annotationResult, logResult, revision.getRevisionNumber());
return new HgAnnotation(myProject, hgFile, annotationResult, logResult, revision == null ? null : revision.getRevisionNumber());
}
public boolean isAnnotationValid(VcsFileRevision rev) {