Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1fa4cef3 authored by Digish Pandya's avatar Digish Pandya
Browse files

hwui: fix possible null pointer de-refrence

add layer check for  null before de-refrencing it.

issue link: http://code.google.com/p/android/issues/detail?id=61622

Change-Id: I54fc21ec594effcfb1eededd80dd5b0b52645c4c
parent 1a3908e9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -339,8 +339,10 @@ void LayerRenderer::destroyLayerDeferred(Layer* layer) {

void LayerRenderer::flushLayer(Layer* layer) {
#ifdef GL_EXT_discard_framebuffer
    if (!layer) return;

    GLuint fbo = layer->getFbo();
    if (layer && fbo) {
    if (fbo) {
        // If possible, discard any enqueud operations on deferred
        // rendering architectures
        if (Extensions::getInstance().hasDiscardFramebuffer()) {