Commit 9d86f331 by Cody Northrop Committed by Commit Bot

Capture/Replay: Avoid null pointer dereference in MEC

Small fix to progress Manhattan MEC. Bug: angleproject:4091 Test: Working through Manhattan frames 5-10, TRex still works Change-Id: I7981e19a64f121b2ecca4451574ca2886641c6ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2039532 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent fc1e8503
...@@ -1220,7 +1220,8 @@ void CaptureMidExecutionSetup(const gl::Context *context, ...@@ -1220,7 +1220,8 @@ void CaptureMidExecutionSetup(const gl::Context *context,
// we set earlier. // we set earlier.
bool isArray = binding == gl::BufferBinding::Array; bool isArray = binding == gl::BufferBinding::Array;
const gl::Buffer *arrayBuffer = replayState.getArrayBuffer(); const gl::Buffer *arrayBuffer = replayState.getArrayBuffer();
if ((isArray && arrayBuffer->id() != bufferID) || (!isArray && bufferID.value != 0)) if ((isArray && arrayBuffer && arrayBuffer->id() != bufferID) ||
(!isArray && bufferID.value != 0))
{ {
cap(CaptureBindBuffer(replayState, true, binding, bufferID)); cap(CaptureBindBuffer(replayState, true, binding, bufferID));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment