From: Marek Ol????k <marek.ol...@amd.com>

this no longer crashes:
- create context (calls atexit)
- teardown context
- create context 2 (calls atexit)
- exit()
---
 tests/util/piglit-framework-gl.c | 4 ++++
 1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/tests/util/piglit-framework-gl.c b/tests/util/piglit-framework-gl.c
index 9748ddf..1e03c73 100644
--- a/tests/util/piglit-framework-gl.c
+++ b/tests/util/piglit-framework-gl.c
@@ -177,8 +177,12 @@ piglit_gl_process_args(int *argc, char *argv[],
 static void
 destroy(void)
 {
+       if (!gl_fw)
+               return;
+
        if (gl_fw->destroy)
                gl_fw->destroy(gl_fw);
+       gl_fw = NULL;
 }
 
 void
-- 
git-series 0.8.10
_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to