From 1da8ae9e46000dd3c4eecd793c559e75012cf535 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 16 Oct 2024 04:55:52 +0200 Subject: [PATCH] fix: Check for null when no device serial was specified --- src/main/kotlin/app/revanced/cli/command/PatchCommand.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/app/revanced/cli/command/PatchCommand.kt b/src/main/kotlin/app/revanced/cli/command/PatchCommand.kt index 49b87df..05f5280 100644 --- a/src/main/kotlin/app/revanced/cli/command/PatchCommand.kt +++ b/src/main/kotlin/app/revanced/cli/command/PatchCommand.kt @@ -255,7 +255,7 @@ internal object PatchCommand : Runnable { AdbInstaller(deviceSerial) } } catch (e: DeviceNotFoundException) { - if (deviceSerial!!.isNotEmpty()) { + if (deviceSerial?.isNotEmpty() == true) { logger.severe( "Device with serial $deviceSerial not found to install to. " + "Ensure the device is connected and the serial is correct when using the --install option.",