From 003f14256271a6955baacba93e54f09d366f1c3b Mon Sep 17 00:00:00 2001 From: sergeyv Date: Thu, 3 Nov 2016 10:00:32 -0700 Subject: [PATCH] Reference ctable when adopting pointer in Bitmap Change-Id: I56aea10928f0ec73756ed055488a3e3516a9096e Test: manual. bug:32621254, 32561595 --- libs/hwui/hwui/Bitmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/hwui/hwui/Bitmap.cpp b/libs/hwui/hwui/Bitmap.cpp index be0b22ee8d31..da63c1826600 100644 --- a/libs/hwui/hwui/Bitmap.cpp +++ b/libs/hwui/hwui/Bitmap.cpp @@ -307,7 +307,7 @@ void Bitmap::reconfigure(const SkImageInfo& newInfo, size_t rowBytes, SkColorTab } mRowBytes = rowBytes; if (mColorTable.get() != ctable) { - mColorTable.reset(ctable); + mColorTable.reset(SkSafeRef(ctable)); } // Need to validate the alpha type to filter against the color type -- 2.11.0