Commit a66cf0fb authored by Jonah Ryan-Davis's avatar Jonah Ryan-Davis Committed by Commit Bot

Un-register the PassthroughGLDebugMessageCallback on Destroy

When the passthrough command decoder is destroyed, the callback needs
to be un-registered from ANGLE. That way if the ANGLE context is used
elsewhere, it won't dereferences an invalid pointer.

Bug: chromium:1048205
Change-Id: Icf1b9969fa2bbc53d449e1b73ef66853303e94c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2055423Reviewed-by: default avatarGeoff Lang <geofflang@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Cr-Commit-Position: refs/heads/master@{#745063}
parent 0930f30b
...@@ -1323,6 +1323,10 @@ void GLES2DecoderPassthroughImpl::Destroy(bool have_context) { ...@@ -1323,6 +1323,10 @@ void GLES2DecoderPassthroughImpl::Destroy(bool have_context) {
group_ = nullptr; group_ = nullptr;
} }
if (have_context) {
api()->glDebugMessageCallbackFn(nullptr, nullptr);
}
if (context_.get()) { if (context_.get()) {
context_->ReleaseCurrent(nullptr); context_->ReleaseCurrent(nullptr);
context_ = nullptr; context_ = nullptr;
......
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