From a9dd820184ee4d083bd9b2af735dcf50b78fc6cd Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 26 Mar 2012 14:52:00 -0700 Subject: Prevent random crashes on SGX architecture Bug #6219894 Change-Id: If77f29da03e557a50e53bae505e1c638a1dbe2cc --- libs/hwui/FontRenderer.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libs/hwui/FontRenderer.cpp') diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp index d7937c74f25e..493dc1bd1a17 100644 --- a/libs/hwui/FontRenderer.cpp +++ b/libs/hwui/FontRenderer.cpp @@ -518,6 +518,8 @@ FontRenderer::~FontRenderer() { mCacheLines.clear(); if (mInitialized) { + // Unbinding the buffer shouldn't be necessary but it crashes with some drivers + Caches::getInstance().unbindIndicesBuffer(); glDeleteBuffers(1, &mIndexBufferID); delete[] mTextMeshPtr; -- cgit v1.2.3-59-g8ed1b