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

Commit 48bc7758 authored by Kiet Le Chi's avatar Kiet Le Chi Committed by Johan Redestig
Browse files

Check the parent for null in deleteEditor

There is a reproducible error in Contacts when the delete
action is triggered more than once and thereby crashing the
app that is fixed by addeding a null check of parent.

Change-Id: I6de29ed0139a5fb377a845da3194475b02a86ee3
parent 3921c68a
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -177,7 +177,10 @@ public abstract class LabeledEditorView extends LinearLayout implements Editor,
        mEntry.markDeleted();
        mEntry.markDeleted();


        // Remove the view
        // Remove the view
        ((ViewGroup) getParent()).removeView(LabeledEditorView.this);
        final ViewGroup parent = (ViewGroup)getParent();
        if (parent != null) {
            parent.removeView(LabeledEditorView.this);
        }
    }
    }


    public boolean isReadOnly() {
    public boolean isReadOnly() {