am 083a557c: fix [2319255] crash in openGL : from the media recorder stress test.
Merge commit '083a557c25e0032bc4900f335b6643d0badd09ce' into eclair-mr2 * commit '083a557c25e0032bc4900f335b6643d0badd09ce': fix [2319255] crash in openGL : from the media recorder stress test.
This commit is contained in:
@@ -134,7 +134,14 @@ void Layer::reloadTexture(const Region& dirty)
|
|||||||
{
|
{
|
||||||
Mutex::Autolock _l(mLock);
|
Mutex::Autolock _l(mLock);
|
||||||
sp<GraphicBuffer> buffer(getFrontBufferLocked());
|
sp<GraphicBuffer> buffer(getFrontBufferLocked());
|
||||||
int index = mFrontBufferIndex;
|
if (buffer == NULL) {
|
||||||
|
// this situation can happen if we ran out of memory for instance.
|
||||||
|
// not much we can do. continue to use whatever texture was bound
|
||||||
|
// to this context.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const int index = mFrontBufferIndex;
|
||||||
|
|
||||||
// create the new texture name if needed
|
// create the new texture name if needed
|
||||||
if (UNLIKELY(mTextures[index].name == -1U)) {
|
if (UNLIKELY(mTextures[index].name == -1U)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user