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