fix obscure text-rendering crash

This commit is contained in:
David Rose 2012-03-03 18:34:56 +00:00
parent f9faceee5b
commit 4183b88c44

View File

@ -195,7 +195,7 @@ garbage_collect() {
Cache::iterator ci;
for (ci = _cache.begin(); ci != _cache.end(); ++ci) {
DynamicTextGlyph *glyph = (*ci).second;
if (glyph->_geom_count != 0) {
if (glyph == (DynamicTextGlyph *)NULL || glyph->_geom_count != 0) {
// Keep this one.
new_cache.insert(new_cache.end(), (*ci));
} else {