Commit 9b29a7a7 authored by Benjamin Otte's avatar Benjamin Otte

pixelcache: Add a warning for an invariant that shouldn't happen

Pixel caches should be unmapped before being freed and unmapping clears
those variables.
parent 6e1fc275
......@@ -69,6 +69,14 @@ _gtk_pixel_cache_free (GtkPixelCache *cache)
if (cache == NULL)
return;
if (cache->timeout_tag ||
cache->surface ||
cache->surface_dirty)
{
g_warning ("pixel cache freed that wasn't unmapped: tag %u surface %p sirty %p",
cache->timeout_tag, cache->surface, cache->surface_dirty);
}
if (cache->timeout_tag)
g_source_remove (cache->timeout_tag);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment