summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-07-29 15:04:20 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-07-29 15:04:20 -0700
commitea15b9092451b6f4167d492beb5f39b6193e5147 (patch)
tree4fe6bc0bc27f1e27ce15489ec8e3ff9d29865026
parentcc21e31f6a8b78be75fb7069287a3f22c1f83537 (diff)
parent28b31647cda80ee08b3b3d7a402832e132505b2c (diff)
downloadmsm7k-ea15b9092451b6f4167d492beb5f39b6193e5147.tar.gz
am 28b31647: fix [2855380] GRG19 monkey native crash in GraphicBufferAllocator
Merge commit '28b31647cda80ee08b3b3d7a402832e132505b2c' * commit '28b31647cda80ee08b3b3d7a402832e132505b2c': fix [2855380] GRG19 monkey native crash in GraphicBufferAllocator
-rw-r--r--libgralloc-qsd8k/gpu.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libgralloc-qsd8k/gpu.cpp b/libgralloc-qsd8k/gpu.cpp
index bcca1eb..a5c7442 100644
--- a/libgralloc-qsd8k/gpu.cpp
+++ b/libgralloc-qsd8k/gpu.cpp
@@ -282,8 +282,10 @@ int gpu_context_t::free_impl(private_handle_t const* hnd) {
} else if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_PMEM_ADSP) {
pmem_allocator = &pmemAdspAllocator;
}
- pmem_allocator->free_pmem_buffer(hnd->size, (void*)hnd->base,
- hnd->offset, hnd->fd);
+ if (pmem_allocator) {
+ pmem_allocator->free_pmem_buffer(hnd->size, (void*)hnd->base,
+ hnd->offset, hnd->fd);
+ }
deps.terminateBuffer(&m->base, const_cast<private_handle_t*>(hnd));
}