Speculative fix for crash with buffer viewer being closed early.

* I received a few crash reports with a disposed buffer viewer still
  doing work. My theory is that some operation took long enough that the
  user was able to close the viewer (perhaps *because* it was taking a
  long time) and subsequent work then didn't handle the window having
  been closed.
This commit is contained in:
baldurk
2017-01-04 16:47:58 +00:00
parent 4a2e901807
commit 07fd9c8e0c
+5 -2
View File
@@ -1553,6 +1553,11 @@ namespace renderdocui.Windows
{
var state = GetUIState(type);
var bufView = state.m_GridView;
if(bufView.IsDisposed)
return;
// only do this once, VSIn is guaranteed to be set (even if it's empty data)
if(type == MeshDataStage.VSIn)
CalcCellFloatWidth();
@@ -1562,8 +1567,6 @@ namespace renderdocui.Windows
if(data.Buffers == null)
return;
var bufView = state.m_GridView;
bufView.RowCount = 0;
state.m_Data = data;