mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-09 16:21:03 +00:00
Potential fix for Android thread race condition
* Synchronous commands are on the stack, so incrementing the done flag should be the last thing we do to interact with them. That includes checking for self- deletion afterwards
This commit is contained in:
@@ -894,10 +894,14 @@ struct AndroidController : public IDeviceProtocolHandler
|
||||
|
||||
cmd->meth();
|
||||
|
||||
Atomic::Inc32(&cmd->done);
|
||||
|
||||
if(cmd->selfdelete)
|
||||
{
|
||||
delete cmd;
|
||||
}
|
||||
else
|
||||
{
|
||||
Atomic::Inc32(&cmd->done);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user