Skip to content

Commit a4e60da

Browse files
committed
Fix #255: make sure we can't add a null textFormat to the action list
1 parent 701950a commit a4e60da

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
@@ -316,7 +316,7 @@ class AztecToolbar : FrameLayout, OnMenuItemClickListener {
316316
val actions = getSelectedActions()
317317
val textFormats = ArrayList<TextFormat>()
318318

319-
actions.forEach { if (it.isStylingAction()) textFormats.add(it.textFormat!!) }
319+
actions.forEach { if (it.isStylingAction() && it.textFormat != null) textFormats.add(it.textFormat) }
320320
if (getSelectedHeading() != null) {
321321
textFormats.add(getSelectedHeading()!!)
322322
}

0 commit comments

Comments
 (0)