diff --git a/android/test/common/src/main/kotlin/net/mullvad/mullvadvpn/test/common/rule/CaptureScreenshotOnFailedTestRule.kt b/android/test/common/src/main/kotlin/net/mullvad/mullvadvpn/test/common/rule/CaptureScreenshotOnFailedTestRule.kt index c7b8992292f2..024522e94a64 100644 --- a/android/test/common/src/main/kotlin/net/mullvad/mullvadvpn/test/common/rule/CaptureScreenshotOnFailedTestRule.kt +++ b/android/test/common/src/main/kotlin/net/mullvad/mullvadvpn/test/common/rule/CaptureScreenshotOnFailedTestRule.kt @@ -69,7 +69,7 @@ class CaptureScreenshotOnFailedTestRule(private val testTag: String) : TestWatch if (uri != null) { contentResolver.openOutputStream(uri).use { try { - this.compress(Bitmap.CompressFormat.JPEG, 50, it) + this.compress(Bitmap.CompressFormat.JPEG, 50, it!!) } catch (e: IOException) { Log.e(testTag, "Unable to store screenshot: ${e.message}") }