diff --git a/panda/src/text/dynamicTextFont.cxx b/panda/src/text/dynamicTextFont.cxx index 6fb954e450..4c290ce15e 100644 --- a/panda/src/text/dynamicTextFont.cxx +++ b/panda/src/text/dynamicTextFont.cxx @@ -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 {