Give errors instead of crashing if dnssd service init fails.
[deb_shairplay.git] / AirTV-Qt / main.cpp
index 6c1724f4e9c17900cc0c00ad705b4438ae06697b..a84258cf7bd2a8cb22e7be37bd7c7fd42343188a 100644 (file)
@@ -38,7 +38,10 @@ int main(int argc, char *argv[])
     MainApplication m;
     QObject::connect(&m, SIGNAL(quitRequested()), &a, SLOT(quit()));
     QObject::connect(&a, SIGNAL(aboutToQuit()), &m, SLOT(aboutToQuit()));
-    m.start();
 
-    return a.exec();
+    if(m.start()) {
+        return a.exec();
+    } else {
+        return EXIT_FAILURE;
+    }
 }