From 45289b316530312b38ba0c4686e1881075a3ec0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=B4=E6=9C=AF?= Date: Thu, 1 Feb 2018 00:03:22 +0800 Subject: [PATCH] [Exposed-UI]: fix crash for NPE(may be stupid). --- .../java/io/virtualapp/home/adapters/LaunchpadAdapter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/VirtualApp/app/src/main/java/io/virtualapp/home/adapters/LaunchpadAdapter.java b/VirtualApp/app/src/main/java/io/virtualapp/home/adapters/LaunchpadAdapter.java index f3c30e30c..6a59ebb41 100644 --- a/VirtualApp/app/src/main/java/io/virtualapp/home/adapters/LaunchpadAdapter.java +++ b/VirtualApp/app/src/main/java/io/virtualapp/home/adapters/LaunchpadAdapter.java @@ -56,6 +56,9 @@ public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { @Override public void onBindViewHolder(ViewHolder holder, int position) { AppData data = mList.get(position); + if (data == null) { + return; + } holder.color = getColor(position); holder.iconView.setImageDrawable(data.getIcon()); holder.nameView.setText(data.getName());