From d2105a18553f16182bf768499a84518d8cd3c893 Mon Sep 17 00:00:00 2001 From: Leith Bade Date: Fri, 23 Jan 2015 00:26:29 +1100 Subject: [PATCH] Fix terminate crash --- src/mbgl/map/map.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index a132fccfe..923ce326a 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -275,6 +275,7 @@ void Map::run() { checkForPause(); } + view.activate(); setup(); prepare(); @@ -301,6 +302,8 @@ void Map::run() { mode = Mode::None; fileSource.clearLoop(); } + + view.deactivate(); } void Map::checkForPause() { @@ -351,7 +354,6 @@ void Map::swapped() { void Map::terminate() { assert(painter); - view.activate(); painter->terminate(); view.deactivate(); } @@ -361,7 +363,6 @@ void Map::terminate() { void Map::setup() { assert(std::this_thread::get_id() == mapThread); assert(painter); - view.activate(); painter->setup(); }