]> Dogcows Code - chaz/openbox/blobdiff - src/GCCache.cc
sync with bb-cvs.
[chaz/openbox] / src / GCCache.cc
index 941d67ef0d0c80bd07005206b59000b904649d5c..35670a85046583142e93ae75c2508ef77e7e5bc6 100644 (file)
@@ -35,6 +35,12 @@ extern "C" {
 #include "Util.hh"
 
 
+BGCCacheContext::~BGCCacheContext(void) {
+  if (gc)
+    XFreeGC(display->getXDisplay(), gc);
+}
+
+
 void BGCCacheContext::set(const BColor &_color,
                           const XFontStruct * const _font,
                           const int _function, const int _subwindow) {
@@ -90,8 +96,6 @@ BGCCache::~BGCCache(void) {
   std::for_each(cache, cache + cache_total_size, PointerAssassin());
   delete [] cache;
   delete [] contexts;
-  cache = 0;
-  contexts = 0;
 }
 
 
@@ -116,6 +120,7 @@ BGCCacheContext *BGCCache::nextContext(unsigned int scr) {
 
   fprintf(stderr, "BGCCache: context fault!\n");
   abort();
+  return (BGCCacheContext*) 0; // not reached
 }
 
 
This page took 0.022797 seconds and 4 git commands to generate.