main: check that outputs are available before running main loop
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>
Fri, 23 Jun 2017 10:24:41 +0000 (12:24 +0200)
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>
Tue, 8 Aug 2017 15:24:00 +0000 (17:24 +0200)
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
src/main.cpp

index cd8d67d..0acf201 100644 (file)
@@ -92,6 +92,9 @@ int main(int argc, char **argv) {
    if (!c.c)
       fatal("ivi_controller global not available");
 
+   if (c.outputs.empty())
+      fatal("no output was set up!");
+
    while (check_events(d.get(), &c, STDIN_FILENO) != -1) {
       c.c->execute_pending();
    }