Skip to content

Commit 5efea25

Browse files
committed
added null guard
1 parent fcdc795 commit 5efea25

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Elasticsearch.Net/Responses/Dynamic/DynamicDictionary.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public bool IsReadOnly
5959
/// <returns>T or default</returns>
6060
public T Get<T>(string path)
6161
{
62+
if (path == null) return default;
6263
var stack = new Stack<string>(path.Split('.'));
6364
if (stack.Count == 0) return default;
6465

0 commit comments

Comments
 (0)