Skip to content

Commit 8fe091a

Browse files
peter-quixPeter Nagy
andauthored
Handle nulls in buffer (#134)
Handle nulls, as now they are possible values coming from TimeseriesDataRaw Co-authored-by: Peter Nagy <[email protected]>
1 parent f6d9040 commit 8fe091a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/CsharpClient/QuixStreams.Streaming/Models/TimeseriesBuffer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ protected TimeseriesDataRaw SelectPdrRowsByMask(TimeseriesDataRaw timeseriesData
551551
/// <returns>Filtered dictionary</returns>
552552
private static Dictionary<string, T[]> GenerateDictionaryMaskFilterMethod<T>(Dictionary<string, T[]> originalDictionary, List<int> selectRows)
553553
{
554+
if (originalDictionary == null) return null;
554555
var newDictionary = new Dictionary<string, T[]>(originalDictionary.Count);
555556
foreach (var kvp in originalDictionary)
556557
{
@@ -748,6 +749,7 @@ private static T[] ArrayConcatMethod<T>(IEnumerable<T[]> inp)
748749

749750
private static void ExtendDictionary<T>(Dictionary<string, T[]> mergeWith, int index, int defaultLen, Dictionary<string, T[]> originalDict)
750751
{
752+
if (mergeWith == null) return;
751753
foreach (var keyValuePair in mergeWith)
752754
{
753755
bool isNotNull = false;

0 commit comments

Comments
 (0)