From: Steinar H. Gunderson Date: Thu, 11 Apr 2013 19:46:10 +0000 (+0200) Subject: When create_input() fails, give an error message instead of crashing. X-Git-Tag: 1.0.0~145 X-Git-Url: https://git.sesse.net/?p=cubemap;a=commitdiff_plain;h=f583e4d329222d8ce2a11524e924c02139b4f28d When create_input() fails, give an error message instead of crashing. --- diff --git a/main.cpp b/main.cpp index 03ef0d7..25f82eb 100644 --- a/main.cpp +++ b/main.cpp @@ -269,6 +269,11 @@ vector create_inputs(const vector &config, } if (input == NULL) { input = create_input(stream_id, src); + if (input == NULL) { + fprintf(stderr, "ERROR: did not understand URL '%s', clients will not get any data.\n", + src.c_str()); + continue; + } } input->run(); inputs.push_back(input);