Skip to content

Commit

Permalink
Potentially fix crash in media info screen
Browse files Browse the repository at this point in the history
  • Loading branch information
rubengees committed Dec 25, 2020
1 parent 68fc27f commit dbbb715
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ class MediaInfoFragment : BaseContentFragment<Entry>(R.layout.fragment_media_inf
onClick: ((T) -> Unit)? = null
) {
layout.post {
if (layout.width <= 0 || view == null) return@post
if (layout.width <= 0 || view == null || view?.isAttachedToWindow != true) return@post
if (layout.childCount > 0) layout.removeAllViews()

for ((index, mappedItem) in items.asSequence().map(mapFunction).withIndex().toList()) {
Expand Down

0 comments on commit dbbb715

Please sign in to comment.