Fix NPE on startup.
There is no invariant in the controller that the fragments it references are non-null, so querying the fragment for state is not always valid. Change-Id: I880053be4000260b03b54ed8741e646b01314e0d
This commit is contained in:
parent
075feb4556
commit
ea56ccf6dd
@ -487,7 +487,9 @@ class UIControllerTwoPane implements
|
|||||||
* for the mailbox list. The two may be different.
|
* for the mailbox list. The two may be different.
|
||||||
*/
|
*/
|
||||||
public long getMessageListMailboxId() {
|
public long getMessageListMailboxId() {
|
||||||
return mMessageListFragment.getMailboxId();
|
return (mMessageListFragment == null)
|
||||||
|
? Mailbox.NO_MAILBOX
|
||||||
|
: mMessageListFragment.getMailboxId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getMessageId() {
|
public long getMessageId() {
|
||||||
|
Loading…
Reference in New Issue
Block a user