no segfault plz tnx
This commit is contained in:
parent
0ebf6a1754
commit
68482ff556
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue