diff --git a/app/src/main/java/com/termux/api/MediaPlayerAPI.java b/app/src/main/java/com/termux/api/MediaPlayerAPI.java index 2b942e9..271c70e 100644 --- a/app/src/main/java/com/termux/api/MediaPlayerAPI.java +++ b/app/src/main/java/com/termux/api/MediaPlayerAPI.java @@ -125,7 +125,7 @@ public class MediaPlayerAPI { } protected static MediaCommandHandler getMediaCommandHandler(final String command) { - switch (command.toUpperCase()) { + switch (command == null ? "" : command.toUpperCase()) { case "INFO": return infoHandler; case "PLAY":