diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-02-12 11:35:18 -0800 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-03-06 16:17:49 +0100 |
commit | d62bf415f0ff3acb6bef1cfca36605cc12a6c6ca (patch) | |
tree | 58946768acf828bb06c1cf63027234c7fc7cb33a /platform | |
parent | 2075d6bb9a6d6236e3e8f5b3f7f2371c23055c55 (diff) | |
download | qtlocation-mapboxgl-d62bf415f0ff3acb6bef1cfca36605cc12a6c6ca.tar.gz |
Fail early in case there is no display
Diffstat (limited to 'platform')
-rw-r--r-- | platform/default/headless_view.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/default/headless_view.cpp b/platform/default/headless_view.cpp index 5f41994c27..975e7f58f7 100644 --- a/platform/default/headless_view.cpp +++ b/platform/default/headless_view.cpp @@ -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) { |