diff options
-rw-r--r-- | mpd-notification.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mpd-notification.c b/mpd-notification.c index d439157..7e5b582 100644 --- a/mpd-notification.c +++ b/mpd-notification.c @@ -74,6 +74,10 @@ int main(int argc, char ** argv) { return EXIT_SUCCESS; case 'H': mpd_host = argv[i] + 2; + if (strlen(mpd_host) == 0) { + fprintf(stderr, "No host given!\n"); + return EXIT_FAILURE; + } printf("%s: using host %s\n", program, mpd_host); break; default: |