bufferqueue: allow null stream in H2BGBP::setSidebandStream

Bug: 38172844
Change-Id: I585e1dc01f2e7f955c39046c1592bda7bea45a23
diff --git a/libs/gui/bufferqueue/1.0/H2BGraphicBufferProducer.cpp b/libs/gui/bufferqueue/1.0/H2BGraphicBufferProducer.cpp
index eafd296..fda5b94 100644
--- a/libs/gui/bufferqueue/1.0/H2BGraphicBufferProducer.cpp
+++ b/libs/gui/bufferqueue/1.0/H2BGraphicBufferProducer.cpp
@@ -1141,7 +1141,7 @@
 
 status_t H2BGraphicBufferProducer::setSidebandStream(
         const sp<NativeHandle>& stream) {
-    return toStatusT(mBase->setSidebandStream(stream->handle()));
+    return toStatusT(mBase->setSidebandStream(stream == nullptr ? nullptr : stream->handle()));
 }
 
 void H2BGraphicBufferProducer::allocateBuffers(uint32_t width, uint32_t height,