Add further checks for windows being deleted during long async callbacks

* This is not really a full solution but fixes the common cases at least.
This commit is contained in:
baldurk
2020-02-05 15:06:45 +00:00
parent bf92f9adf0
commit 08c0b13aaa
2 changed files with 18 additions and 0 deletions
+12
View File
@@ -2402,6 +2402,9 @@ void BufferViewer::OnEventChanged(uint32_t eventId)
bufdata->vsinConfig.curView, MeshDataStage::GSOut);
RT_FetchMeshData(r, m_Ctx, bufdata);
if(!me)
return;
}
else
{
@@ -2418,6 +2421,9 @@ void BufferViewer::OnEventChanged(uint32_t eventId)
{
buf->storage = r->GetTextureData(m_BufferID, m_TexSub);
}
if(!me)
return;
}
GUIInvoke::call(this, [this, buf, bufdata]() {
@@ -2548,6 +2554,9 @@ void BufferViewer::populateBBox(PopulateBufferData *bufdata)
calcBoundingData(*bbox);
if(!me)
return;
GUIInvoke::call(this, [this, bbox]() { UI_UpdateBoundingBox(*bbox); });
});
thread->setName(lit("BBox calc"));
@@ -3103,6 +3112,9 @@ void BufferViewer::render_clicked(QMouseEvent *e)
if(vertSelected != ~0U)
{
if(!me)
return;
GUIInvoke::call(this, [this, vertSelected, instanceSelected] {
int row = (int)vertSelected;