Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Only print Sprite warnings if we have Sprites set
Browse files Browse the repository at this point in the history
If we don't set Sprites at all or the Sprites were not
loaded yet, the warnings can be misleading.
  • Loading branch information
tmpsantos committed Jul 16, 2015
1 parent dd81887 commit 3835155
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mbgl/annotation/sprite_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ std::shared_ptr<const SpriteImage> SpriteStore::getSprite(const std::string& nam
if (it != sprites.end()) {
return it->second;
} else {
Log::Info(Event::Sprite, "Can't find sprite named '%s'", name.c_str());
if (!sprites.empty()) {
Log::Info(Event::Sprite, "Can't find sprite named '%s'", name.c_str());
}
return nullptr;
}
}
Expand Down

0 comments on commit 3835155

Please sign in to comment.