Fix crash

This commit is contained in:
nielsandriesse
2020-08-19 12:15:02 +10:00
parent 38464bf1f7
commit e1841db991
2 changed files with 8 additions and 2 deletions

View File

@@ -142,7 +142,11 @@ class PathActivity : PassphraseRequiredActionBarActivity() {
private fun getPathRow(snode: Snode, location: LineView.Location, dotAnimationStartDelay: Long, dotAnimationRepeatInterval: Long, isGuardSnode: Boolean): LinearLayout {
val title = if (isGuardSnode) resources.getString(R.string.activity_path_guard_node_row_title) else resources.getString(R.string.activity_path_service_node_row_title)
val subtitle = IP2Country.shared.countryNamesCache[snode.ip] ?: "Resolving..."
val subtitle = if (IP2Country.isInitialized) {
IP2Country.shared.countryNamesCache[snode.ip] ?: "Resolving..."
} else {
"Resolving..."
}
return getPathRow(title, subtitle, location, dotAnimationStartDelay, dotAnimationRepeatInterval)
}
// endregion