mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 00:37:47 +00:00
Fix for MediaOverviewActivity NPE
// FREEBIE
This commit is contained in:
parent
5f9a3b7930
commit
abea2d0bdf
@ -24,6 +24,7 @@ import android.database.Cursor;
|
||||
import android.os.Build.VERSION;
|
||||
import android.os.Build.VERSION_CODES;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.LoaderManager;
|
||||
import android.support.v4.content.Loader;
|
||||
@ -132,10 +133,10 @@ public class MediaOverviewActivity extends PassphraseRequiredActionBarActivity i
|
||||
gridView.setLayoutManager(gridManager);
|
||||
gridView.setHasFixedSize(true);
|
||||
|
||||
Address[] addresses = Address.fromParcelable(getIntent().getParcelableArrayExtra(ADDRESSES_EXTRA));
|
||||
Parcelable[] parcelables = getIntent().getParcelableArrayExtra(ADDRESSES_EXTRA);
|
||||
|
||||
if (addresses != null) {
|
||||
recipients = RecipientFactory.getRecipientsFor(this, addresses, true);
|
||||
if (parcelables != null) {
|
||||
recipients = RecipientFactory.getRecipientsFor(this, Address.fromParcelable(parcelables), true);
|
||||
} else if (threadId > -1) {
|
||||
recipients = DatabaseFactory.getThreadDatabase(this).getRecipientsForThreadId(threadId);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user