Explorar el Código

fix NPE if status is null

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Marcel Hibbe hace 3 años
padre
commit
0dc42a1b1e
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      app/src/main/java/com/nextcloud/talk/ui/StatusDrawable.java

+ 1 - 1
app/src/main/java/com/nextcloud/talk/ui/StatusDrawable.java

@@ -56,7 +56,7 @@ public class StatusDrawable extends Drawable {
         if ("dnd".equals(status)) {
             icon = R.drawable.ic_user_status_dnd;
             this.context = context;
-        } else if (TextUtils.isEmpty(statusIcon)) {
+        } else if (TextUtils.isEmpty(statusIcon) && status != null) {
             switch (status) {
                 case "online":
                     icon = R.drawable.online_status;