IDEA-81927 NPE at com.intellij.openapi.vcs.FilePathImpl.isUnder

This commit is contained in:
irengrig
2012-02-27 19:19:00 +04:00
parent 973a3d5582
commit 708c5e9973
@@ -44,10 +44,10 @@ public class ChangesComparator implements Comparator<Change> {
if (myTreeCompare) {
final FilePath parentPath1 = filePath1.getParentPath();
final FilePath parentPath2 = filePath2.getParentPath();
if (parentPath1 != null && parentPath1.isUnder(parentPath2, true)) {
if (parentPath1 != null && parentPath2 != null && parentPath1.isUnder(parentPath2, true)) {
return -1;
}
if (parentPath2 != null && parentPath2.isUnder(parentPath1, true)) {
if (parentPath2 != null && parentPath1 != null && parentPath2.isUnder(parentPath1, true)) {
return 1;
}
return filePath1.getPath().compareToIgnoreCase(filePath2.getPath());