fix some more memory problems
[dana/dcompmgr.git] / render.c
index 8d272fb..7950419 100644 (file)
--- a/render.c
+++ b/render.c
@@ -6,6 +6,7 @@
 #include "display.h"
 #include "list.h"
 #include <stdio.h>
+#include <assert.h>
 #include <stdlib.h>
 #include <xcb/render.h>
 
@@ -145,8 +146,6 @@ render_window_hide(d_window_t *w)
         window_remove_plugin_data(w, plugin_id);
     }
 
-    window_unref(w);
-
     /* pass it on */
     d->window_hide(w);
 }
@@ -257,6 +256,7 @@ render_window_resize(d_window_t *w)
 
     d = screen_find_plugin_data(w->sc, plugin_id);
     wd = window_find_plugin_data(w, plugin_id);
+    assert(wd != NULL);
     render_free_picture(w, wd);
 
     /* pass it on */