From 4183b88c44045bc2665e937a71ca666a44d783c4 Mon Sep 17 00:00:00 2001 From: David Rose Date: Sat, 3 Mar 2012 18:34:56 +0000 Subject: [PATCH] fix obscure text-rendering crash --- panda/src/text/dynamicTextFont.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {