mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-25 16:06:31 +00:00
Ensure buffers are deleted if async processing is aborted
This commit is contained in:
@@ -3521,7 +3521,10 @@ void BufferViewer::OnEventChanged(uint32_t eventId)
|
||||
|
||||
m_Ctx.Replay().AsyncInvoke([this, me, bufdata](IReplayController *r) {
|
||||
if(!me)
|
||||
{
|
||||
delete bufdata;
|
||||
return;
|
||||
}
|
||||
|
||||
BufferData *buf = NULL;
|
||||
|
||||
@@ -3633,7 +3636,10 @@ void BufferViewer::OnEventChanged(uint32_t eventId)
|
||||
}
|
||||
|
||||
if(!me)
|
||||
{
|
||||
delete bufdata;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3725,6 +3731,7 @@ void BufferViewer::OnEventChanged(uint32_t eventId)
|
||||
if(!me)
|
||||
{
|
||||
delete buf;
|
||||
delete bufdata;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -3742,7 +3749,10 @@ void BufferViewer::OnEventChanged(uint32_t eventId)
|
||||
|
||||
GUIInvoke::call(this, [this, bufdata]() {
|
||||
if(bufdata->sequence != m_Sequence)
|
||||
{
|
||||
delete bufdata;
|
||||
return;
|
||||
}
|
||||
|
||||
if(!bufdata->out1Config.statusString.isEmpty())
|
||||
{
|
||||
@@ -4044,12 +4054,18 @@ void BufferViewer::populateBBox(PopulateBufferData *bufdata)
|
||||
// fire up a thread to calculate the bounding box
|
||||
LambdaThread *thread = new LambdaThread([this, me, bbox] {
|
||||
if(!me)
|
||||
{
|
||||
delete bbox;
|
||||
return;
|
||||
}
|
||||
|
||||
calcBoundingData(*bbox);
|
||||
|
||||
if(!me)
|
||||
{
|
||||
delete bbox;
|
||||
return;
|
||||
}
|
||||
|
||||
GUIInvoke::call(this, [this, bbox]() { UI_UpdateBoundingBox(*bbox); });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user