add a null check before displaying properties dialog

This commit is contained in:
tibbi 2017-01-15 11:59:47 +01:00
parent 40ec71c5c2
commit 876f81c0e7

View file

@ -141,7 +141,8 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
} }
private fun showProperties() { private fun showProperties() {
PropertiesDialog(this, getCurrentFile().absolutePath, false) if (getCurrentMedium() != null)
PropertiesDialog(this, getCurrentMedium()!!.path, false)
} }
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) { override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {