Browse Source

fix obscure text-rendering crash

David Rose 13 years ago
parent
commit
4183b88c44
1 changed files with 1 additions and 1 deletions
  1. 1 1
      panda/src/text/dynamicTextFont.cxx

+ 1 - 1
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 {