Skip to content

Commit baad141

Browse files
fix: add null check for toolbar action views
1 parent ab286ed commit baad141

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/toolbar/AztecToolbar.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ class AztecToolbar : FrameLayout, IAztecToolbar, OnMenuItemClickListener {
505505
if (action != ToolbarAction.ELLIPSIS_COLLAPSE &&
506506
action != ToolbarAction.ELLIPSIS_EXPAND) {
507507
val view = findViewById<ToggleButton>(action.buttonId)
508-
if (view.isChecked) actions.add(action)
508+
if (view?.isChecked == true) actions.add(action)
509509
}
510510
}
511511

0 commit comments

Comments
 (0)