Skip to content

Commit 911e7fe

Browse files
author
Vladimir Kotal
authored
avoid null pointer dereference (#2291)
1 parent 8dd5c85 commit 911e7fe

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/history/RCSHistoryParser.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,13 @@ History parse(File file, Repository repos) throws HistoryException {
8080
}
8181

8282
private History parseFile(File file) throws IOException {
83+
File rcsfile = getRCSFile(file);
84+
if (rcsfile == null) {
85+
return null;
86+
}
87+
8388
try {
84-
Archive archive = new Archive(getRCSFile(file).getPath());
89+
Archive archive = new Archive(rcsfile.getPath());
8590
Version ver = archive.getRevisionVersion();
8691
Node n = archive.findNode(ver);
8792
n = n.root();

0 commit comments

Comments
 (0)