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

Commit 357c9424 authored by Romain Guy's avatar Romain Guy
Browse files

Prevent crash with NPE in HardwareRenderer

Bug #5109839

Change-Id: I402fc70ff4b25d273cf3150759d6f2d4d971975d
parent 6203f6c8
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() {