drm_hwcomposer: Don't try to import client layer in headless mode

Pipeline is null in the headless mode, therefore any attempt to
import the buffer causes a null-pointer dereference crash.

Fixes: 4b2cc484f9af ("drm_hwcomposer: Reorganize struct DrmHwcLayer")
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
diff --git a/hwc2_device/HwcDisplay.cpp b/hwc2_device/HwcDisplay.cpp
index 76e2745..9a31ac8 100644
--- a/hwc2_device/HwcDisplay.cpp
+++ b/hwc2_device/HwcDisplay.cpp
@@ -606,6 +606,10 @@
     return HWC2::Error::None;
   }
 
+  if (IsInHeadlessMode()) {
+    return HWC2::Error::None;
+  }
+
   client_layer_.PopulateLayerData(/*test = */ true);
   if (!client_layer_.IsLayerUsableAsDevice()) {
     ALOGE("Client layer must be always usable by DRM/KMS");