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

Commit 33e6ad6e authored by Romain Guy's avatar Romain Guy Committed by Android (Google) Code Review
Browse files

Merge "Prevent crash with NPE in HardwareRenderer Bug #5109839"

parents 64d61707 357c9424
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -686,15 +686,16 @@ public abstract class HardwareRenderer {
                mCanvas = null;
            }

            if (!isEnabled() || mDestroyed) return;

            mDestroyed = true;
            if (!isEnabled() || mDestroyed) {
                setEnabled(false);
                return;
            }

            destroySurface();
            setEnabled(false);

            mDestroyed = true;
            mGl = null;

            setEnabled(false);
        }

        void destroySurface() {