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 /modules/gralloc/gralloc.cpp | |
parent | da1b975339f714aaaf0939fd5db64a86cb48ee88 (diff) | |
download | hardware_libhardware-3d6ddfe77133198f48f0670d93172ee67d5b5ea7.tar.gz hardware_libhardware-3d6ddfe77133198f48f0670d93172ee67d5b5ea7.tar.bz2 hardware_libhardware-3d6ddfe77133198f48f0670d93172ee67d5b5ea7.zip |
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.
Diffstat (limited to 'modules/gralloc/gralloc.cpp')
-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 af1ed66..a371f05 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; |