From c71593e90f62f0edce0b3b2d503d5b00c355f622 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 18 Jul 2018 10:50:30 +0200 Subject: [PATCH] adding a search related crashfix --- .../com/simplemobiletools/gallery/activities/MediaActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt index abf1ae8fd..e16f0bfc6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -261,7 +261,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { private fun setupSearch(menu: Menu) { val searchManager = getSystemService(Context.SEARCH_SERVICE) as SearchManager mSearchMenuItem = menu.findItem(R.id.search) - (mSearchMenuItem!!.actionView as SearchView).apply { + (mSearchMenuItem?.actionView as? SearchView)?.apply { setSearchableInfo(searchManager.getSearchableInfo(componentName)) isSubmitButtonEnabled = false setOnQueryTextListener(object : SearchView.OnQueryTextListener {