mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 17:24:24 +02:00
fix crash on domain restart in Agent, also have Agent properly shutdown on call to Script.stop()
This commit is contained in:
parent
c8ef3489d2
commit
438e5bd235
2 changed files with 7 additions and 0 deletions
|
@ -189,4 +189,9 @@ void Agent::run() {
|
||||||
|
|
||||||
_scriptEngine.setScriptContents(scriptContents);
|
_scriptEngine.setScriptContents(scriptContents);
|
||||||
_scriptEngine.run();
|
_scriptEngine.run();
|
||||||
|
setFinished(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Agent::aboutToFinish() {
|
||||||
|
_scriptEngine.stop();
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,8 @@ public:
|
||||||
bool isListeningToAudioStream() const { return _scriptEngine.isListeningToAudioStream(); }
|
bool isListeningToAudioStream() const { return _scriptEngine.isListeningToAudioStream(); }
|
||||||
void setIsListeningToAudioStream(bool isListeningToAudioStream)
|
void setIsListeningToAudioStream(bool isListeningToAudioStream)
|
||||||
{ _scriptEngine.setIsListeningToAudioStream(isListeningToAudioStream); }
|
{ _scriptEngine.setIsListeningToAudioStream(isListeningToAudioStream); }
|
||||||
|
|
||||||
|
virtual void aboutToFinish();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void run();
|
void run();
|
||||||
|
|
Loading…
Reference in a new issue