Fail early in case there is no display
This commit is contained in:
committed by
Konstantin Käfer
parent
2075d6bb9a
commit
d62bf415f0
@@ -100,6 +100,10 @@ void HeadlessView::loadExtensions() {
|
||||
}
|
||||
|
||||
void HeadlessView::createContext() {
|
||||
if (!display_) {
|
||||
throw std::runtime_error("Display is not set");
|
||||
}
|
||||
|
||||
#if MBGL_USE_CGL
|
||||
CGLError error = CGLCreateContext(display_->pixelFormat, NULL, &glContext);
|
||||
if (error != kCGLNoError) {
|
||||
|
||||
Reference in New Issue
Block a user