mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-13 05:20:45 +00:00
Fix crash if CustomPaintWidget is destroyed with paint mid-flight
This commit is contained in:
@@ -92,7 +92,13 @@ void CustomPaintWidget::paintEvent(QPaintEvent *e)
|
||||
if(m_Ctx)
|
||||
{
|
||||
if(m_Output != NULL)
|
||||
m_Ctx->Replay().AsyncInvoke(m_Tag, [this](IReplayController *r) { m_Output->Display(); });
|
||||
{
|
||||
QPointer<CustomPaintWidget> me(this);
|
||||
m_Ctx->Replay().AsyncInvoke(m_Tag, [me](IReplayController *r) {
|
||||
if(me && me->m_Output)
|
||||
me->m_Output->Display();
|
||||
});
|
||||
}
|
||||
}
|
||||
else if(m_Dark == m_Light)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user