projects
/
mikachu
/
openbox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ebf6a1
)
no segfault plz tnx
author
Dana Jansens
<danakj@orodu.net>
Thu, 13 Feb 2003 04:54:54 +0000
(
04:54
+0000)
committer
Dana Jansens
<danakj@orodu.net>
Thu, 13 Feb 2003 04:54:54 +0000
(
04:54
+0000)
otk/rendercolor.cc
patch
|
blob
|
history
diff --git
a/otk/rendercolor.cc
b/otk/rendercolor.cc
index 6143a4510b4bec6d807e923f1a0e7ea7c2a4af96..3e20be1a06a56972f376563722025b42a50f3cc2 100644
(file)
--- a/
otk/rendercolor.cc
+++ b/
otk/rendercolor.cc
@@
-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);