diff --git a/rosen/modules/render_service/core/pipeline/rs_surface_capture_task.cpp b/rosen/modules/render_service/core/pipeline/rs_surface_capture_task.cpp index 1deb331119..33c1ebcece 100644 --- a/rosen/modules/render_service/core/pipeline/rs_surface_capture_task.cpp +++ b/rosen/modules/render_service/core/pipeline/rs_surface_capture_task.cpp @@ -80,6 +80,10 @@ std::unique_ptr RSSurfaceCaptureTask::CreatePixelMapBySurfaceNo ROSEN_LOGE("CreatePixelMapBySurfaceNode: node == nullptr"); return nullptr; } + if (node->GetBuffer() == nullptr) { + ROSEN_LOGE("CreatePixelMapBySurfaceNode: node GetBuffer == nullptr"); + return nullptr; + } int pixmapWidth = node->GetRenderProperties().GetBoundsWidth(); int pixmapHeight = node->GetRenderProperties().GetBoundsHeight(); Media::InitializationOptions opts;