From f0e240d8d79d359279a823973b1499bc09c4dff3 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 1 Mar 2009 15:14:11 +0100 Subject: Don't add shared station when input empty --- src/ui_act.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ui_act.c') 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); -- cgit v1.2.3