Edit collection fragment: fix crash.

pull/152/head
Tom Hacohen 4 years ago
parent 4b6ce9ac5d
commit fe376b22d6

@ -238,12 +238,15 @@ class EditCollectionFragment : Fragment() {
} }
} catch (e: EtebaseException) { } catch (e: EtebaseException) {
uiThread { uiThread {
val context = context
if (context != null) {
AlertDialog.Builder(requireContext()) AlertDialog.Builder(requireContext())
.setIcon(R.drawable.ic_info_dark) .setIcon(R.drawable.ic_info_dark)
.setTitle(R.string.exception) .setTitle(R.string.exception)
.setMessage(e.localizedMessage) .setMessage(e.localizedMessage)
.setPositiveButton(android.R.string.yes) { _, _ -> }.show() .setPositiveButton(android.R.string.yes) { _, _ -> }.show()
} }
}
} finally { } finally {
uiThread { uiThread {
loadingModel.setLoading(false) loadingModel.setLoading(false)

Loading…
Cancel
Save