aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2022-04-20 16:03:35 +0200
committerThomas White <taw@physics.org>2022-06-02 12:15:38 +0200
commitcad70f87ea137f7e60a36d9e8aa45f3f03c11a4a (patch)
tree197f169aa8915cd817b8d8a589ec5fb4843f1ae7 /src
parent2bf23b74fc94e95b15d93aff65505dcc8bf10176 (diff)
ASAP::O: Give up if there are no streams at all
Diffstat (limited to 'src')
-rw-r--r--src/im-asapo.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/im-asapo.c b/src/im-asapo.c
index 68635946..f336a735 100644
--- a/src/im-asapo.c
+++ b/src/im-asapo.c
@@ -149,8 +149,13 @@ static int select_last_stream(struct im_asapo *a)
return 1;
}
- STATUS("Streams available at start:\n");
n = asapo_stream_infos_get_size(si);
+ if ( n == 0 ) {
+ STATUS("No streams.\n");
+ return 1;
+ }
+
+ STATUS("Streams available at start:\n");
for ( i=0; i<n; i++ ) {
AsapoStreamInfoHandle st = asapo_stream_infos_get_item(si, i);
STATUS("Stream %i: %s\n", i, asapo_stream_info_get_name(st));