diff options
author | Nasser Grainawi <quic_nasserg@quicinc.com> | 2024-12-10 17:36:26 -0700 |
---|---|---|
committer | Nasser Grainawi <quic_nasserg@quicinc.com> | 2024-12-10 17:43:34 -0700 |
commit | d2ff398bcbd0177200651f684920b513a923ab82 (patch) | |
tree | b5164e38fb45cb9727d460b9dfa887f425b2b6d6 | |
parent | 2b229df06c94fa351ce00227a107835e3b21f5ce (diff) | |
download | jgit-d2ff398bcbd0177200651f684920b513a923ab82.tar.gz jgit-d2ff398bcbd0177200651f684920b513a923ab82.zip |
Fix potential NPE in TreeWalk#getFilterCommandDefinition
Change-Id: Ic6f0fd26153b47b4aeeec105bac431225d9bf8bf
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java index aaac2a72e0..b789c5120e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java @@ -1587,6 +1587,9 @@ public class TreeWalk implements AutoCloseable, AttributesProvider { */ private String getFilterCommandDefinition(String filterDriverName, String filterCommandType) { + if (config == null) { + return null; + } String key = filterDriverName + "." + filterCommandType; //$NON-NLS-1$ String filterCommand = filterCommandsByNameDotType.get(key); if (filterCommand != null) |