summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDane Springmeyer <dane@mapbox.com>2019-08-18 00:08:12 -0700
committerDane Springmeyer <dane@mapbox.com>2019-08-30 15:57:04 -0700
commitc966c313a88dcd798667d8a7b12ea8ebf4e24fe3 (patch)
treeab180fba023996abba9c5a9b2e29d59c05294ae0
parent2984535804282062f93a2a62b745ba636e5746fa (diff)
downloadqtlocation-mapboxgl-c966c313a88dcd798667d8a7b12ea8ebf4e24fe3.tar.gz
Workaround crash by calling loadDescription before setObserver
-rw-r--r--src/mbgl/style/style_impl.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mbgl/style/style_impl.cpp b/src/mbgl/style/style_impl.cpp
index 10fee73cdd..eadffa02ca 100644
--- a/src/mbgl/style/style_impl.cpp
+++ b/src/mbgl/style/style_impl.cpp
@@ -139,9 +139,8 @@ void Style::Impl::addSource(std::unique_ptr<Source> source) {
throw std::runtime_error(msg.c_str());
}
- source->setObserver(this);
source->loadDescription(fileSource);
-
+ source->setObserver(this);
sources.add(std::move(source));
}