]> git.sesse.net Git - cubemap/commitdiff
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 03ef0d7aaa5ef587cd2547be0b07b38abe0f7183..25f82eb291a5ed3893b8f4516c3bacc816cc9d94 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);