Warning improvements when requesting bad URLs

Found while debugging some issues with add-default-catalog flow in
the launcher.
This commit is contained in:
James Turner
2018-05-08 06:50:15 +01:00
parent a232565b3e
commit f5ff969cd4
2 changed files with 11 additions and 1 deletions
+5
View File
@@ -778,6 +778,11 @@ bool Root::removeCatalogById(const std::string& aId)
void Root::requestThumbnailData(const std::string& aUrl)
{
if (aUrl.empty()) {
SG_LOG(SG_GENERAL, SG_DEV_WARN, "requestThumbnailData: empty URL requested");
return;
}
auto it = d->thumbnailCache.find(aUrl);
if (it == d->thumbnailCache.end()) {
bool cachedOnDisk = d->checkPersistentCache(aUrl);