From 197eeb1e85ec02c5c935fb36c7952c88aafbaed3 Mon Sep 17 00:00:00 2001 From: dongjunkun <1440418246@qq.com> Date: Thu, 2 Mar 2017 10:29:18 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81release1.0.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/src/main/java/com/yyydjk/library/BannerLayout.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/src/main/java/com/yyydjk/library/BannerLayout.java b/library/src/main/java/com/yyydjk/library/BannerLayout.java index 42f9881..fb40c37 100644 --- a/library/src/main/java/com/yyydjk/library/BannerLayout.java +++ b/library/src/main/java/com/yyydjk/library/BannerLayout.java @@ -335,7 +335,9 @@ protected void onWindowVisibilityChanged(int visibility) { private void stopAutoPlay() { if (isAutoPlay) { handler.removeMessages(WHAT_AUTO_PLAY); - pager.setCurrentItem(pager.getCurrentItem(), false); + if (pager != null) { + pager.setCurrentItem(pager.getCurrentItem(), false); + } } }