mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-22 09:01:57 -05:00
Android: Fix crash dialog not showing most of the time
This commit is contained in:
parent
a93a2273d1
commit
3d7054f90d
1 changed files with 2 additions and 2 deletions
|
@ -698,8 +698,8 @@ public class MainActivity extends Activity {
|
|||
final Semaphore dialogSem = new Semaphore(0, true);
|
||||
|
||||
void releaseDialogSem() {
|
||||
// Only release when no free permits (otherwise showAlert doesn't block when called)
|
||||
if (dialogSem.availablePermits() > 0) return;
|
||||
// Only release when no waiting threads (otherwise showAlert doesn't block when called)
|
||||
if (!dialogSem.hasQueuedThreads()) return;
|
||||
dialogSem.release();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue