am 28b31647: fix [2855380] GRG19 monkey native crash in GraphicBufferAllocator

Merge commit '28b31647cda80ee08b3b3d7a402832e132505b2c'

* commit '28b31647cda80ee08b3b3d7a402832e132505b2c':
  fix [2855380] GRG19 monkey native crash in GraphicBufferAllocator
This commit is contained in:
Mathias Agopian 2010-07-29 15:04:20 -07:00 committed by Android Git Automerger
commit 61598fa84e

View File

@ -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));
}