diff options
author | Mathias Agopian <mathias@google.com> | 2009-07-06 20:19:16 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-07-06 20:54:51 -0700 |
commit | 3d6ddfe77133198f48f0670d93172ee67d5b5ea7 (patch) | |
tree | 449f7c3ed7e7dbcc05318cfea329da110050b609 | |
parent | da1b975339f714aaaf0939fd5db64a86cb48ee88 (diff) | |
download | libhardware-3d6ddfe77133198f48f0670d93172ee67d5b5ea7.tar.gz |
fix [1964228] emulator crash with the new GL
gralloc didn't keep the error state properly, so after the first pmem allocation failure, it would systematically fail without reverting to ashmem.
-rw-r--r-- | modules/gralloc/gralloc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gralloc/gralloc.cpp b/modules/gralloc/gralloc.cpp index af1ed666..a371f051 100644 --- a/modules/gralloc/gralloc.cpp +++ b/modules/gralloc/gralloc.cpp @@ -195,9 +195,9 @@ static int init_pmem_area_locked(private_module_t* m) static int init_pmem_area(private_module_t* m) { - int err = 0; pthread_mutex_lock(&m->lock); - if (m->pmem_master == -1) { + int err = m->pmem_master; + if (err == -1) { err = init_pmem_area_locked(m); if (err) { m->pmem_master = err; |