mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-22 05:35:48 +00:00
Don't delete objects allocated in renderdoc module outside it.
This commit is contained in:
@@ -2759,7 +2759,7 @@ void BufferViewer::debugVertex()
|
||||
|
||||
if(trace->states.count == 0)
|
||||
{
|
||||
delete trace;
|
||||
r->FreeTrace(trace);
|
||||
|
||||
// if we couldn't debug the pixel on this event, open up a pixel history
|
||||
GUIInvoke::call([this]() {
|
||||
|
||||
@@ -644,7 +644,7 @@ void PixelHistoryView::startDebug(EventTag tag)
|
||||
if(trace->states.count == 0)
|
||||
{
|
||||
RDDialog::critical(this, tr("Debug Error"), tr("Error debugging pixel."));
|
||||
delete trace;
|
||||
m_Ctx.Replay().AsyncInvoke([trace](IReplayController *r) { r->FreeTrace(trace); });
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -484,7 +484,10 @@ void ShaderViewer::debugShader(const ShaderBindpointMapping *bind, const ShaderR
|
||||
|
||||
ShaderViewer::~ShaderViewer()
|
||||
{
|
||||
delete m_Trace;
|
||||
// don't want to async invoke while using 'this', so save the trace separately
|
||||
ShaderDebugTrace *trace = m_Trace;
|
||||
|
||||
m_Ctx.Replay().AsyncInvoke([trace](IReplayController *r) { r->FreeTrace(trace); });
|
||||
|
||||
if(m_CloseCallback)
|
||||
m_CloseCallback(&m_Ctx);
|
||||
|
||||
@@ -3284,7 +3284,7 @@ void TextureViewer::on_debugPixelContext_clicked()
|
||||
|
||||
if(trace->states.count == 0)
|
||||
{
|
||||
delete trace;
|
||||
r->FreeTrace(trace);
|
||||
|
||||
// if we couldn't debug the pixel on this event, open up a pixel history
|
||||
GUIInvoke::call([this]() { on_pixelHistory_clicked(); });
|
||||
|
||||
Reference in New Issue
Block a user