1
0
mirror of https://github.com/danog/termux-api.git synced 2025-01-22 21:31:10 +01:00

MediaPlayerAPI: prevent NullPointerException

Fixes #154.
This commit is contained in:
Tom Yan 2018-04-04 18:52:14 +08:00 committed by Fredrik Fornwall
parent 1be62a5c91
commit 9c104aac36

View File

@ -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":