Merge "VR: Fail presentation without layers"
diff --git a/services/vr/vr_window_manager/composer/impl/vr_hwc.cpp b/services/vr/vr_window_manager/composer/impl/vr_hwc.cpp
index f83fa86..7e406a5 100644
--- a/services/vr/vr_window_manager/composer/impl/vr_hwc.cpp
+++ b/services/vr/vr_window_manager/composer/impl/vr_hwc.cpp
@@ -178,6 +178,11 @@
}
}
+ if (frame.empty()) {
+ ALOGE("Requested frame with no layers");
+ return Error::BAD_LAYER;
+ }
+
// Increment the time the fence is signalled every time we get the
// presentation frame. This ensures that calling ReleaseFrame() only affects
// the current frame.