When create_input() fails, give an error message instead of crashing.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 11 Apr 2013 19:46:10 +0000 (21:46 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 11 Apr 2013 19:46:10 +0000 (21:46 +0200)
main.cpp

index 03ef0d7..25f82eb 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -269,6 +269,11 @@ vector<Input *> create_inputs(const vector<ConfigLine> &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);