diff --git a/CHANGELOG.md b/CHANGELOG.md index 76c7faf568c..157370c4529 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,10 @@ - [core] Fix issue that `within` expression returns incorrect results for geometries crossing the anti-meridian ([#16330](https://github.com/mapbox/mapbox-gl-native/pull/16330)) +- [core] Fix assert in gfx resources cleanup ([#16349](https://github.com/mapbox/mapbox-gl-native/pull/16349)) + + Fix a resource leak assertion in `gl::Context::~Context()` that is evaluating false in scenarios where graphics context has been marked as lost. + ## maps-v1.4.1 ### 🐞 Bug fixes diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp index fc51dc859b6..9c7898cc1df 100644 --- a/src/mbgl/gl/context.cpp +++ b/src/mbgl/gl/context.cpp @@ -61,8 +61,8 @@ Context::Context(RendererBackend& backend_) Context::~Context() { if (cleanupOnDestruction) { reset(); + assert(stats.isZero()); } - assert(stats.isZero()); } void Context::initializeExtensions(const std::function& getProcAddress) {