diff options
Diffstat (limited to 'libs/hwui/Layer.cpp')
-rw-r--r-- | libs/hwui/Layer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/hwui/Layer.cpp b/libs/hwui/Layer.cpp index 114347d94357..cdbbbab7730d 100644 --- a/libs/hwui/Layer.cpp +++ b/libs/hwui/Layer.cpp @@ -197,7 +197,12 @@ void Layer::generateTexture() { } void Layer::clearTexture() { - caches.textureState().unbindTexture(texture.mId); + // There's a rare possibility that Caches could have been destroyed already + // since this method is queued up as a task. + // Since this is a reset method, treat this as non-fatal. + if (caches.isInitialized()) { + caches.textureState().unbindTexture(texture.mId); + } texture.mId = 0; } |