fix crash bug for styles that have no glyph url specified

This commit is contained in:
Konstantin Käfer
2014-08-06 18:33:21 +02:00
parent 915e89bee8
commit 9dc48b773f
3 changed files with 15 additions and 14 deletions

View File

@@ -226,12 +226,19 @@ void GlyphPBF::parse(FontStack &stack) {
data.clear();
}
GlyphStore::GlyphStore(const std::string &glyphURL)
: glyphURL(glyphURL) {}
GlyphStore::GlyphStore() {}
void GlyphStore::setURL(const std::string &url) {
glyphURL = url;
}
void GlyphStore::waitForGlyphRanges(const std::string &fontStack, const std::set<GlyphRange> &glyphRanges) {
// We are implementing a blocking wait with futures: Every GlyphSet has a future that we are
// waiting for until it is loaded.
if (glyphRanges.empty()) {
return;
}
FontStack *stack = nullptr;