Skip to content

Commit

Permalink
fix crash: Attempt to invoke interface method int java.util.List.size…
Browse files Browse the repository at this point in the history
…() on a null object reference
  • Loading branch information
or-else committed Aug 24, 2019
1 parent 3d910ff commit 36a8de0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions app/src/main/java/co/tinode/tindroid/ContactsAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import android.content.res.TypedArray;
import android.database.Cursor;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.text.SpannableString;
import android.text.TextUtils;
import android.text.style.TextAppearanceSpan;
Expand All @@ -21,7 +20,6 @@
import java.util.Set;

import androidx.annotation.NonNull;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.recyclerview.widget.RecyclerView;

/**
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/co/tinode/tindroid/FindAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ private int getCursorItemCount() {
}

private int getFoundItemCount() {
return mFound.size();
return mFound != null ? mFound.size() : 0;
}

private Object getItemAt(int position) {
Expand Down

0 comments on commit 36a8de0

Please sign in to comment.