From 3eff291aaed5e83ca0bb1f330c79d402fc3c57b1 Mon Sep 17 00:00:00 2001 From: Kalyan Kondapally Date: Tue, 31 Jan 2017 10:02:37 -0800 Subject: [PATCH] Fix crash with virtual display. We where accessing wrong handle here causing seg faults. Jira: AIA-99 Test: System doesnt crash when Secondary display option is enabled from developer options. Signed-off-by: Kalyan Kondapally --- os/android/drmhwctwo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/android/drmhwctwo.cpp b/os/android/drmhwctwo.cpp index 66df969..1e9c3f7 100644 --- a/os/android/drmhwctwo.cpp +++ b/os/android/drmhwctwo.cpp @@ -472,7 +472,7 @@ HWC2::Error DrmHwcTwo::HwcDisplay::SetOutputBuffer(buffer_handle_t buffer, ALOGE("SetOutputBuffer called \n"); struct gralloc_handle *temp = new struct gralloc_handle(); - temp->handle_ = temp->buffer_->handle; + temp->handle_ = buffer; display_->SetOutputBuffer(temp, release_fence); return HWC2::Error::None; } -- 2.11.0