Fix potention NPE on video recording failures.

This commit is contained in:
Greyson Parrelli
2026-02-24 14:53:58 -05:00
committed by Cody Henthorne
parent 845704b9fe
commit 549992c08a

View File

@@ -161,7 +161,9 @@ class MediaCaptureFragment : Fragment(R.layout.fragment_container), CameraFragme
override fun onVideoCaptureError() {
Log.w(TAG, "Video capture error.")
Toast.makeText(requireContext(), R.string.MediaSendActivity_camera_unavailable, Toast.LENGTH_SHORT).show()
context?.let { context ->
Toast.makeText(context, R.string.MediaSendActivity_camera_unavailable, Toast.LENGTH_SHORT).show()
}
}
override fun onGalleryClicked() {