wrapping the dependencyManager::get<> call with ifdef to prevent the log from constantly spitting out that instance does not exist

This commit is contained in:
amer cerkic 2019-06-07 16:25:04 -07:00
parent f2c6cb79f7
commit da071abd8b

View file

@ -274,6 +274,8 @@ static QTimer pingTimer;
#if defined(Q_OS_ANDROID)
static bool DISABLE_WATCHDOG = true;
#else
static const QString DISABLE_WATCHDOG_FLAG{ "HIFI_DISABLE_WATCHDOG" };
static bool DISABLE_WATCHDOG = nsightActive() || QProcessEnvironment::systemEnvironment().contains(DISABLE_WATCHDOG_FLAG);
#endif
@ -5180,11 +5182,13 @@ ivec2 Application::getMouse() const {
}
FaceTracker* Application::getActiveFaceTracker() {
#ifdef HAVE_DDE
auto dde = DependencyManager::get<DdeFaceTracker>();
if (dde && dde->isActive()) {
return static_cast<FaceTracker*>(dde.data());
}
#endif
return nullptr;
}
@ -7228,6 +7232,9 @@ void Application::nodeKilled(SharedNodePointer node) {
_entityEditSender.nodeKilled(node);
qDebug() << "NODE KIlled: " << node->getType() << "********************************************************";
if (node->getType() == NodeType::AudioMixer) {
QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(), "audioMixerKilled");
} else if (node->getType() == NodeType::EntityServer) {