From a17e0f7a39e489a8477476d684f3eaeef34f19ad Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 15 Feb 2017 02:26:31 +0100 Subject: [PATCH] declare viewpager as nullable --- .../simplemobiletools/gallery/activities/ViewPagerActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt index 2b8638339..89f1314d5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -147,7 +147,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private fun updatePagerItems() { val pagerAdapter = MyPagerAdapter(this, supportFragmentManager, mMedia) - view_pager.apply { + view_pager?.apply { adapter = pagerAdapter currentItem = mPos addOnPageChangeListener(this@ViewPagerActivity)