summaryrefslogtreecommitdiffstats
path: root/libs/hwui/GradientCache.h
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2011-08-08 10:55:55 -0700
committerRomain Guy <romainguy@google.com>2011-08-08 10:55:55 -0700
commit4974bc1be68a77cf9709a8c50ef6de06ce8a3a0d (patch)
treedb01a34325101d69722648f539b6f4b488913f94 /libs/hwui/GradientCache.h
parent1eb1f72ccd8c021e9989645a024dcd20ff678420 (diff)
downloadframeworks_base-4974bc1be68a77cf9709a8c50ef6de06ce8a3a0d.zip
frameworks_base-4974bc1be68a77cf9709a8c50ef6de06ce8a3a0d.tar.gz
frameworks_base-4974bc1be68a77cf9709a8c50ef6de06ce8a3a0d.tar.bz2
Prevent crash when purging the gradients cache.
Bug #5133876 Change-Id: I3d1fa4e29498044796d725337ac93e6a1e8f0bcb
Diffstat (limited to 'libs/hwui/GradientCache.h')
-rw-r--r--libs/hwui/GradientCache.h4
1 files changed, 2 insertions, 2 deletions
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 @@ struct GradientCacheEntry {
}
~GradientCacheEntry() {
- delete[] colors;
- delete[] positions;
+ if (colors) delete[] colors;
+ if (positions) delete[] positions;
}
bool operator<(const GradientCacheEntry& r) const {