From adc463efd8de41c7f2f166549a8f47fbecd2ff52 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 16 Mar 2008 11:27:50 -0400 Subject: [PATCH] when freeing window data for a window, also remove the pointer to it in the window --- glxrender.c | 6 ++++-- render.c | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/glxrender.c b/glxrender.c index 4647d62..62b5465 100644 --- a/glxrender.c +++ b/glxrender.c @@ -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; diff --git a/render.c b/render.c index 63b0a4b..be00e6f 100644 --- 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; -- 2.34.1