blast: check for buffer before dumping format

Check if a BLAST buffer is null before trying to dump its format.

Test: dumpsys SurfaceFlinger
Bug: 80477568

Change-Id: Id4ef1891bef25a313e42942c6a8a3cdfc6d4c09c
diff --git a/services/surfaceflinger/BufferStateLayer.cpp b/services/surfaceflinger/BufferStateLayer.cpp
index 425f5c7..5ffd8ad 100644
--- a/services/surfaceflinger/BufferStateLayer.cpp
+++ b/services/surfaceflinger/BufferStateLayer.cpp
@@ -336,6 +336,9 @@
 }
 
 PixelFormat BufferStateLayer::getPixelFormat() const {
+    if (!mActiveBuffer) {
+        return PIXEL_FORMAT_NONE;
+    }
     return mActiveBuffer->format;
 }