diff options
author | Chris Warren-Smith | 2011-08-14 06:01:53 +1000 |
---|---|---|
committer | Chris Warren-Smith | 2011-08-21 16:38:53 +1000 |
commit | ad58d2feafe2e85961e57ef05d4061d51dfb2172 (patch) | |
tree | 653b13d666c2c82edb750aff327400e44444ec2f /backends/platform/bada | |
parent | e748ea68a5f7e2e2e11dd863fab9c369c756aad3 (diff) | |
download | scummvm-rg350-ad58d2feafe2e85961e57ef05d4061d51dfb2172.tar.gz scummvm-rg350-ad58d2feafe2e85961e57ef05d4061d51dfb2172.tar.bz2 scummvm-rg350-ad58d2feafe2e85961e57ef05d4061d51dfb2172.zip |
BADA: Fix for lockup when game thread fails to respond to quit event
Diffstat (limited to 'backends/platform/bada')
-rwxr-xr-x | backends/platform/bada/form.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/backends/platform/bada/form.cpp b/backends/platform/bada/form.cpp index f75acfed20..92b3f07179 100755 --- a/backends/platform/bada/form.cpp +++ b/backends/platform/bada/form.cpp @@ -101,8 +101,12 @@ BadaAppForm::~BadaAppForm() { if (_gameThread && _state != ErrorState) {
terminate();
+
_gameThread->Stop();
- _gameThread->Join();
+ if (_state != ErrorState) {
+ _gameThread->Join();
+ }
+
delete _gameThread;
_gameThread = null;
}
@@ -136,6 +140,11 @@ void BadaAppForm::terminate() { for (int i = 0; i < 10 && _state == ClosingState; i++) {
Thread::Sleep(250);
}
+
+ if (_state = ClosingState) {
+ // failed to terminate - Join() will freeze
+ _state = ErrorState;
+ }
}
}
|