Ref T166, fixed parse command line: audio context can be empty

This commit is contained in:
Klaus Basan
2017-09-28 04:38:15 +02:00
parent f815f7734d
commit c5381b01c6

View File

@@ -138,7 +138,8 @@ namespace BlackCore
bool CCoreFacade::parseCommandLine(const QString &commandLine, const CIdentifier &originator)
{
bool handled = false;
if (this->getIContextAudio()) { handled = handled || this->getIContextAudio()->parseCommandLine(commandLine, originator); }
// audio can be empty depending on whre it runs
if (this->getIContextAudio() && !this->getIContextAudio()->isEmptyObject()) { handled = handled || this->getIContextAudio()->parseCommandLine(commandLine, originator); }
if (this->getIContextNetwork()) { handled = handled || this->getIContextNetwork()->parseCommandLine(commandLine, originator); }
if (this->getIContextOwnAircraft()) { handled = handled || this->getIContextOwnAircraft()->parseCommandLine(commandLine, originator); }
if (this->getIContextSimulator()) { handled = handled || this->getIContextSimulator()->parseCommandLine(commandLine, originator); }