message: Try to avoid crashing if a failed map is used mid-capture
diff: @@ -2375,6 +2375,7 @@ bool WrappedOpenGL::Serialise_glFlushMappedNamedBufferRangeEXT(SerialiserType &s
  {
  record = GetResourceManager()->GetResourceRecord(buffer);
  + if(record->Map.ptr)
  FlushedData = record->Map.ptr + offset;
  MapOffset = record->Map.offset;
  }
  @@ -2564,6 +2565,8 @@ void WrappedOpenGL::PersistentMapMemoryBarrier(const set<GLResourceRecord *> &ma
  RDCASSERT(record && record->Map.ptr);
  + if(record->Map.ptr)
  + {
  size_t diffStart = 0, diffEnd = record->Map.length;
  bool found = true;
  @@ -2577,7 +2580,8 @@ void WrappedOpenGL::PersistentMapMemoryBarrier(const set<GLResourceRecord *> &ma
  if(record->GetShadowPtr(0) == NULL)
  record->AllocShadowStorage(record->Map.length);
  else
  - memcpy(record->GetShadowPtr(0) + diffStart, record->Map.ptr + diffStart, diffEnd - diffStart);
  + memcpy(record->GetShadowPtr(0) + diffStart, record->Map.ptr + diffStart,
  + diffEnd - diffStart);
  // we use our own flush function so it will serialise chunks when necessary, and it
  // also handles copying into the persistent mapped pointer and flushing the real GL
  @@ -2588,6 +2592,7 @@ void WrappedOpenGL::PersistentMapMemoryBarrier(const set<GLResourceRecord *> &ma
  }
  }
  }
  +}
  #pragma endregion
  