fix: images could be null.
All checks were successful
continuous-integration/drone/tag Build is passing

This commit is contained in:
aminecmi 2023-05-27 21:06:56 +02:00
parent 6e5704a45b
commit 9e3a86e7f5

View File

@ -553,8 +553,8 @@ class ArticleFragment : Fragment(), DIAware {
}
fun performClick(): Boolean {
if (binding.webcontent.hitTestResult.type == WebView.HitTestResult.IMAGE_TYPE ||
binding.webcontent.hitTestResult.type == WebView.HitTestResult.SRC_IMAGE_ANCHOR_TYPE
if (allImages != null && (binding.webcontent.hitTestResult.type == WebView.HitTestResult.IMAGE_TYPE ||
binding.webcontent.hitTestResult.type == WebView.HitTestResult.SRC_IMAGE_ANCHOR_TYPE)
) {
val position: Int = allImages.indexOf(binding.webcontent.hitTestResult.extra)