summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@lavabit.com>2009-03-01 15:14:11 +0100
committerLars-Dominik Braun <PromyLOPh@lavabit.com>2009-03-01 15:14:11 +0100
commitf0e240d8d79d359279a823973b1499bc09c4dff3 (patch)
treeaadedcdbed9a15cbe0475e9a02803d037bc147c6
parent1383525f1287365673591b6286034c74f3f213ff (diff)
downloadpianobar-f0e240d8d79d359279a823973b1499bc09c4dff3.tar.gz
pianobar-f0e240d8d79d359279a823973b1499bc09c4dff3.tar.bz2
pianobar-f0e240d8d79d359279a823973b1499bc09c4dff3.zip
Don't add shared station when input empty
-rw-r--r--src/ui_act.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui_act.c b/src/ui_act.c
index 8782532..1ba4277 100644
--- a/src/ui_act.c
+++ b/src/ui_act.c
@@ -131,7 +131,8 @@ void BarUiActCreateStation (BAR_KS_ARGS) {
void BarUiActAddSharedStation (BAR_KS_ARGS) {
char *stationId = NULL;
- if ((stationId = readline ("Station id: ")) != NULL) {
+ if ((stationId = readline ("Station id: ")) != NULL &&
+ strlen (stationId) > 0) {
BarUiMsg ("Adding shared station... ");
BarUiPrintPianoStatus (PianoCreateStation (ph, "sh", stationId));
free (stationId);