From: Kalyan Kondapally Date: Tue, 31 Jan 2017 18:02:37 +0000 (-0800) Subject: Fix crash with virtual display. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=3eff291aaed5e83ca0bb1f330c79d402fc3c57b1;p=android-x86%2Fexternal-IA-Hardware-Composer.git 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 --- 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; }