Skip to content
This repository was archived by the owner on Dec 14, 2021. It is now read-only.

Commit 313847d

Browse files
jhugmanElise Richards
authored andcommitted
Fixup crash in isButton with Java/Kotlin null dereference (#1039)
1 parent 37e266a commit 313847d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/src/main/java/mozilla/lockbox/autofill/ViewNodeNavigator.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,9 @@ class ViewNodeNavigator(
116116
node.htmlInfo?.attributes?.find { name == it.first }?.second
117117

118118
override fun isButton(node: ViewNode): Boolean {
119+
val className = node.className ?: ""
119120
when {
120-
node.className.contains("Button") -> return true
121+
className.contains("Button") -> return true
121122
htmlTagName(node) == "button" -> return true
122123
htmlTagName(node) != "input" -> return false
123124
}

0 commit comments

Comments
 (0)