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

Commit 25193d33 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Fix issue #3411615: Crash when getting dialog layout inflator.

Well, I'm not sure it is right for onCreateDialog() to return a null
dialog, but if it does, let's not crash here.

Change-Id: I5ff49b9b3c326d9005f70a01435c01bfc7307343
parent 6c2193a7
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -363,9 +363,13 @@ public class DialogFragment extends Fragment
            case STYLE_NO_TITLE:
                mDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
        }
        if (mDialog != null) {
            return (LayoutInflater)mDialog.getContext().getSystemService(
                    Context.LAYOUT_INFLATER_SERVICE);
        }
        return (LayoutInflater)mActivity.getSystemService(
                Context.LAYOUT_INFLATER_SERVICE);
    }
    
    /**
     * Override to build your own custom Dialog container.  This is typically