Просмотр исходного кода

修复 可能存在的空指针

zengjiebin лет назад: 7
Родитель
Сommit
4ebfe3224a
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      app/src/main/java/com/sheep/gamegroup/view/activity/ActWebX5.java

+ 2 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/ActWebX5.java

@@ -294,7 +294,8 @@ public class ActWebX5 extends BaseActWeb {
                     act_web_loading_iv.startAnimation(animation);
                     act_web_loading_iv.startAnimation(animation);
                 }
                 }
                 ViewUtil.setVisibility(act_web_loading_pb, newProgress != 100);
                 ViewUtil.setVisibility(act_web_loading_pb, newProgress != 100);
-                act_web_loading_pb.setProgress(newProgress);
+                if(act_web_loading_pb != null)
+                    act_web_loading_pb.setProgress(newProgress);
                 super.onProgressChanged(view, newProgress);
                 super.onProgressChanged(view, newProgress);
             }
             }
         });
         });