Skip to content

Commit 50c103d

Browse files
committed
check shares
Signed-off-by: alperozturk <[email protected]>
1 parent ca134d9 commit 50c103d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/src/main/java/it/niedermann/owncloud/notes/share/adapter/ShareeListAdapter.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*/
3131
public class ShareeListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
3232

33-
private Account account;
33+
private final Account account;
3434
private final ShareeListAdapterListener listener;
3535
private final Activity activity;
3636
private List<OCShare> shares;
@@ -49,6 +49,10 @@ public ShareeListAdapter(Activity activity,
4949

5050
@Override
5151
public int getItemViewType(int position) {
52+
if (shares == null) {
53+
return 0;
54+
}
55+
5256
if (position < 0 || position >= shares.size()) {
5357
return 0;
5458
}

0 commit comments

Comments
 (0)