Prevent crash when closing the tablet while a sound is playing.
Showing the changes to libraries/script-engine/src/TabletScriptingInterface.cpp (1 of 1 file). Show all
Unified · Split
| @@ -283,7 +283,8 @@ SoundEffect::~SoundEffect() { · 282 unmodified lines | |||
| 283 | _sound->deleteLater(); | 283 | _sound->deleteLater(); |
| 284 | } | 284 | } |
| 285 | if (_injector) { | 285 | if (_injector) { |
| 286 | _injector->deleteLater(); | 286 | // stop will cause the AudioInjector to delete itself. |
| 287 | _injector->stop(); | ||
| 287 | } | 288 | } |
| 288 | } | 289 | } |
| 289 | 290 | ||