Skip to content

Commit 0e98a44

Browse files
Fix for nullreference exception (dotnet#3857)
1 parent 2343c81 commit 0e98a44

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCommand.Encryption.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,7 @@ private SqlDataReader TryFetchInputParameterEncryptionInfo(
12931293
// not present as the rpcName, as is the case with non-_batchRPCMode. So
12941294
// input parameters start at parameters[1]. parameters[0] is the actual
12951295
// T-SQL Statement. rpcName is sp_executesql.
1296-
if (_RPCList[i].systemParams.Length > 1)
1296+
if (_RPCList[i].systemParams != null && _RPCList[i].systemParams.Length > 1)
12971297
{
12981298
_RPCList[i].needsFetchParameterEncryptionMetadata = true;
12991299

0 commit comments

Comments
 (0)