diff options
author | Romain Guy <romainguy@google.com> | 2011-08-08 10:55:55 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2011-08-08 10:55:55 -0700 |
commit | 4974bc1be68a77cf9709a8c50ef6de06ce8a3a0d (patch) | |
tree | db01a34325101d69722648f539b6f4b488913f94 /libs | |
parent | 1eb1f72ccd8c021e9989645a024dcd20ff678420 (diff) | |
download | frameworks_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')
-rw-r--r-- | libs/hwui/GradientCache.h | 4 |
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 { |