diff --git a/libs/hwui/hwui/Bitmap.cpp b/libs/hwui/hwui/Bitmap.cpp index b99f4c85be154..b8f7d9f016976 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