no segfault plz tnx

This commit is contained in:
Dana Jansens 2003-02-13 04:54:54 +00:00
parent 0ebf6a1754
commit 68482ff556

View file

@ -102,9 +102,10 @@ RenderColor::~RenderColor()
{
unsigned long color = _blue | _green << 8 | _red << 16;
CacheItem *item = _cache[_screen][color];
if (_allocated) {
CacheItem *item = _cache[_screen][color];
assert(item); // better be...
if (item) {
if (--item->count <= 0) {
// remove from the cache
XFreeGC(**display, _gc);