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
1 changed files with 2 additions and 1 deletions

View File

@ -141,7 +141,8 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
}
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?) {