From 38351554f45e02c1c7b59beeb11f5675d22f19b3 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Thu, 16 Jul 2015 17:32:44 +0300 Subject: [PATCH] Only print Sprite warnings if we have Sprites set If we don't set Sprites at all or the Sprites were not loaded yet, the warnings can be misleading. --- src/mbgl/annotation/sprite_store.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mbgl/annotation/sprite_store.cpp b/src/mbgl/annotation/sprite_store.cpp index 1c6511d8e..8d2231a2b 100644 --- a/src/mbgl/annotation/sprite_store.cpp +++ b/src/mbgl/annotation/sprite_store.cpp @@ -54,7 +54,9 @@ std::shared_ptr 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; } }