OSDN Git Service

Fix crash with virtual display.
authorKalyan Kondapally <kalyan.kondapally@intel.com>
Tue, 31 Jan 2017 18:02:37 +0000 (10:02 -0800)
committerKalyan Kondapally <kalyan.kondapally@intel.com>
Tue, 31 Jan 2017 19:04:44 +0000 (11:04 -0800)
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 <kalyan.kondapally@intel.com>
os/android/drmhwctwo.cpp

index 66df969..1e9c3f7 100644 (file)
@@ -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;
 }