summaryrefslogtreecommitdiff
path: root/platform/darwin/src/run_loop.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-10-06 16:10:09 +0200
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-10-06 10:16:45 -0700
commit08809b4d446940d31d777c787971ea6ae6b3fa1c (patch)
treea155f96340b8d1b421eb73cea6eeefcb009b629f /platform/darwin/src/run_loop.cpp
parent7bcb04a609415132db112b02507118835d519e36 (diff)
downloadqtlocation-mapboxgl-08809b4d446940d31d777c787971ea6ae6b3fa1c.tar.gz
[macos,ios] initialize util::RunLoop in SDK rather than by default
Diffstat (limited to 'platform/darwin/src/run_loop.cpp')
-rw-r--r--platform/darwin/src/run_loop.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/darwin/src/run_loop.cpp b/platform/darwin/src/run_loop.cpp
index 6e9a1c50b0..63bd8d2f53 100644
--- a/platform/darwin/src/run_loop.cpp
+++ b/platform/darwin/src/run_loop.cpp
@@ -8,7 +8,6 @@ namespace mbgl {
namespace util {
static ThreadLocal<RunLoop>& current = *new ThreadLocal<RunLoop>;
-static RunLoop mainRunLoop;
class RunLoop::Impl {
public:
@@ -22,6 +21,7 @@ RunLoop* RunLoop::Get() {
RunLoop::RunLoop(Type)
: impl(std::make_unique<Impl>()) {
+ assert(!current.get());
current.set(this);
impl->async = std::make_unique<AsyncTask>(std::bind(&RunLoop::process, this));
}