[core] send signal to RenderCustomLayer when gl context has been lost

- Prevents cleaning up of GL resources that no longer exist, resulting in a crash
This commit is contained in:
Ivo van Dongen
2017-09-15 18:03:04 +03:00
committed by Ivo van Dongen
parent 67285f3a95
commit bda6ed26c6
6 changed files with 29 additions and 1 deletions

View File

@@ -16,7 +16,7 @@ RenderCustomLayer::RenderCustomLayer(Immutable<style::CustomLayer::Impl> _impl)
RenderCustomLayer::~RenderCustomLayer() {
assert(BackendScope::exists());
if (initialized && impl().deinitializeFn) {
if (initialized && !contextDestroyed && impl().deinitializeFn) {
impl().deinitializeFn(impl().context);
}
}