From 5a63ce557629eee8436b004d6940d52e758949d4 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Tue, 15 Dec 2015 14:51:01 -0800 Subject: [PATCH] [core] Avoid loading source if a source request is currently ongoing --- src/mbgl/map/source.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mbgl/map/source.cpp b/src/mbgl/map/source.cpp index 142564334..adbd7d6ad 100644 --- a/src/mbgl/map/source.cpp +++ b/src/mbgl/map/source.cpp @@ -61,6 +61,8 @@ void Source::load() { return; } + if (req) return; + // URL may either be a TileJSON file, or a GeoJSON file. FileSource* fs = util::ThreadContext::getFileSource(); req = fs->request({ Resource::Kind::Source, info.url }, [this](Response res) {