fix a crash when excluding folder without parents

This commit is contained in:
tibbi 2017-03-04 10:34:46 +01:00
parent c6de3a9e85
commit b94b803a40
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ class ExcludeFolderDialog(val activity: SimpleActivity, val selectedPaths: List<
}
private fun dialogConfirmed() {
val path = alternativePaths[radioGroup!!.checkedRadioButtonId]
val path = if (alternativePaths.isEmpty()) selectedPaths[0] else alternativePaths[radioGroup!!.checkedRadioButtonId]
activity.config.addExcludedFolder(path)
callback.invoke()
}