Skip to content

Commit 45289b3

Browse files
author
维术
committed
[Exposed-UI]: fix crash for NPE(may be stupid).
1 parent fe19a17 commit 45289b3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

VirtualApp/app/src/main/java/io/virtualapp/home/adapters/LaunchpadAdapter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
5656
@Override
5757
public void onBindViewHolder(ViewHolder holder, int position) {
5858
AppData data = mList.get(position);
59+
if (data == null) {
60+
return;
61+
}
5962
holder.color = getColor(position);
6063
holder.iconView.setImageDrawable(data.getIcon());
6164
holder.nameView.setText(data.getName());

0 commit comments

Comments
 (0)