summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-07-06 16:35:58 +0200
committerKonstantin Käfer <mail@kkaefer.com>2015-07-08 19:46:03 +0200
commitc66ec8739b0a0bfb22c59f05c6125717763c6f7e (patch)
treeafe1b17fb372cf21410bf3928b43713cd5f8c8b6 /src
parent493c72b1f470f839ee6d9e56583c17837a9809a3 (diff)
downloadqtlocation-mapboxgl-c66ec8739b0a0bfb22c59f05c6125717763c6f7e.tar.gz
show info message when Sprite does not exist
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/annotation/sprite_store.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mbgl/annotation/sprite_store.cpp b/src/mbgl/annotation/sprite_store.cpp
index 1cc5d76412..1c6511d8e8 100644
--- a/src/mbgl/annotation/sprite_store.cpp
+++ b/src/mbgl/annotation/sprite_store.cpp
@@ -51,7 +51,12 @@ void SpriteStore::removeSprite(const std::string& name) {
std::shared_ptr<const SpriteImage> SpriteStore::getSprite(const std::string& name) {
std::lock_guard<std::mutex> lock(mutex);
const auto it = sprites.find(name);
- return it != sprites.end() ? it->second : nullptr;
+ if (it != sprites.end()) {
+ return it->second;
+ } else {
+ Log::Info(Event::Sprite, "Can't find sprite named '%s'", name.c_str());
+ return nullptr;
+ }
}
SpriteStore::Sprites SpriteStore::getDirty() {