when freeing window data for a window, also remove the pointer to it in the window
authorDana Jansens <danakj@orodu.net>
Sun, 16 Mar 2008 15:27:50 +0000 (11:27 -0400)
committerDana Jansens <danakj@orodu.net>
Sun, 16 Mar 2008 15:27:50 +0000 (11:27 -0400)
glxrender.c
render.c

index 4647d62..62b5465 100644 (file)
@@ -305,9 +305,11 @@ glxrender_window_show(d_window_t *w)
     d->window_show(w);
 
     wd = window_find_plugin_data(w, plugin_id);
-    if (wd)
+    if (wd) {
         glxrender_window_free_data(w, d, wd);
-   
+        window_remove_plugin_data(w, plugin_id);
+    }
+
     wd = malloc(sizeof(window_data_t));
     glGenTextures(1, &wd->texname);
     wd->glpixmap = XCB_NONE;
index 63b0a4b..be00e6f 100644 (file)
--- a/render.c
+++ b/render.c
@@ -222,8 +222,10 @@ render_window_show(d_window_t *w)
     d->window_show(w);
 
     wd = window_find_plugin_data(w, plugin_id);
-    if (wd)
+    if (wd) {
         render_window_free(w, wd);
+        window_add_plugin_data(w, plugin_id, wd);
+    }
    
     wd = malloc(sizeof(window_data_t));
     wd->picture = XCB_NONE;