--- a/application.cpp
+++ b/application.cpp
@@ -429,6 +429,14 @@
connect(m->m_ohpro, SIGNAL(sourceTypeChanged(int)),
this, SLOT(onSourceTypeChanged(int)));
+ int scratch;
+ if (!m->m_ohpro->sourceIndex(&scratch)) {
+ // nobody there.
+ qDebug() << "setupRenderer: can't connect to OpenHome renderer" <<
+ m->m_renderer_friendly_name;
+ return false;
+ }
+
// Try to use the time service
OHTMH ohtm = m->m_rdr->ohtm();
if (ohtm) {
@@ -460,6 +468,9 @@
return false;
}
m->m_avto = new AVTPlayer(avt);
+ if (m->m_avto == nullptr || !m->m_avto->checkConnection()) {
+ return false;
+ }
}
// Keep this after avt object creation !