adamreeve commented on code in PR #44377:
URL: https://github.com/apache/arrow/pull/44377#discussion_r1796328646


##########
csharp/src/Apache.Arrow.Flight/FlightRecordBatchStreamWriter.cs:
##########
@@ -64,7 +64,7 @@ protected virtual void Dispose(bool disposing)
         {
             if (!_disposed)
             {
-                _flightDataStream.Dispose();
+                _flightDataStream?.Dispose();

Review Comment:
   This isn't required for any of the included tests, but before disabling the 
`primitive_no_batches` test, it would crash here with a NullReferenceException 
due to the writer being disposed before the stream was created.
   
   With this fix, writing doesn't crash, but the data isn't found when trying 
to retrieve it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to