message: Fix crashes if exporting structured data with open D3D12 capture
diff: @@ -143,8 +143,6 @@ WrappedID3D12Device::WrappedID3D12Device(ID3D12Device *realDevice, D3D12InitPara
  m_pDevice->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS, &m_D3D12Opts, sizeof(m_D3D12Opts));
  }
  - WrappedID3D12Resource::m_List = NULL;
  -
  // refcounters implicitly construct with one reference, but we don't start with any soft
  // references.
  m_SoftRefCounter.Release();
  @@ -179,6 +177,7 @@ WrappedID3D12Device::WrappedID3D12Device(ID3D12Device *realDevice, D3D12InitPara
  {
  m_State = CaptureState::LoadingReplaying;
  + if(realDevice)
  WrappedID3D12Resource::m_List = new std::map<ResourceId, WrappedID3D12Resource *>();
  m_FrameCaptureRecord = NULL;
  @@ -188,6 +187,8 @@ WrappedID3D12Device::WrappedID3D12Device(ID3D12Device *realDevice, D3D12InitPara
  else
  {
  m_State = CaptureState::BackgroundCapturing;
  +
  + WrappedID3D12Resource::m_List = NULL;
  }
  m_ResourceManager = new D3D12ResourceManager(m_State, this);
  @@ -292,6 +293,7 @@ WrappedID3D12Device::~WrappedID3D12Device()
  {
  RenderDoc::Inst().RemoveDeviceFrameCapturer((ID3D12Device *)this);
  + if(!IsStructuredExporting(m_State))
  SAFE_DELETE(WrappedID3D12Resource::m_List);
  for(size_t i = 0; i < m_QueueFences.size(); i++)
  