commit | 4974bc1be68a77cf9709a8c50ef6de06ce8a3a0d | [log] [tgz] |
---|---|---|
author | Romain Guy <romainguy@google.com> | Mon Aug 08 10:55:55 2011 -0700 |
committer | Romain Guy <romainguy@google.com> | Mon Aug 08 10:55:55 2011 -0700 |
tree | db01a34325101d69722648f539b6f4b488913f94 | |
parent | 1eb1f72ccd8c021e9989645a024dcd20ff678420 [diff] [blame] |
Prevent crash when purging the gradients cache. Bug #5133876 Change-Id: I3d1fa4e29498044796d725337ac93e6a1e8f0bcb
diff --git a/libs/hwui/GradientCache.h b/libs/hwui/GradientCache.h index 086921c..45c1005 100644 --- a/libs/hwui/GradientCache.h +++ b/libs/hwui/GradientCache.h
@@ -58,8 +58,8 @@ } ~GradientCacheEntry() { - delete[] colors; - delete[] positions; + if (colors) delete[] colors; + if (positions) delete[] positions; } bool operator<(const GradientCacheEntry& r) const {