From 7a222198086e2c2ce7a19a989d1feee0cd31d8ab Mon Sep 17 00:00:00 2001 From: Marcus Fritzsch Date: Fri, 23 Jun 2017 12:24:41 +0200 Subject: main: check that outputs are available before running main loop Signed-off-by: Marcus Fritzsch --- src/main.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index cd8d67d..0acf201 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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(); } -- cgit 1.2.3-korg