[core] Ensure that a BackendScope exists when doing GL calls
This commit is contained in:
committed by
John Firebaugh
parent
d7227e13a7
commit
8e5214144e
@@ -1,4 +1,5 @@
|
||||
#include <mbgl/map/backend.hpp>
|
||||
#include <mbgl/map/backend_scope.hpp>
|
||||
#include <mbgl/gl/context.hpp>
|
||||
|
||||
#include <cassert>
|
||||
@@ -9,6 +10,7 @@ Backend::Backend() : context(std::make_unique<gl::Context>()) {
|
||||
}
|
||||
|
||||
gl::Context& Backend::getContext() {
|
||||
assert(BackendScope::exists());
|
||||
return *context;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user