CCodecBufferChannel: add null checks

Bug: 185869285
Test: manual
Change-Id: I86cc4f37cd74704718accda4c8cc43f4121427a1
diff --git a/media/codec2/sfplugin/CCodecBufferChannel.cpp b/media/codec2/sfplugin/CCodecBufferChannel.cpp
index 0008172..4485a1b 100644
--- a/media/codec2/sfplugin/CCodecBufferChannel.cpp
+++ b/media/codec2/sfplugin/CCodecBufferChannel.cpp
@@ -1761,7 +1761,7 @@
         {
             Mutexed<Output>::Locked output(mOutput);
             numOutputSlots = output->numSlots;
-            reorderDepth = output->buffers->getReorderDepth();
+            reorderDepth = output->buffers ? output->buffers->getReorderDepth() : 0;
         }
         Mutexed<OutputSurface>::Locked output(mOutputSurface);
         output->maxDequeueBuffers = numOutputSlots + reorderDepth + kRenderingDepth;