From 81635076d3f07502c9364aa258a08eb51913ba7b Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 25 Feb 2010 16:14:13 +0000 Subject: [PATCH] make sure r_glsl_permutation and r_cg_permutation variables are NULL when renderer is started or shuts down git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10005 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rmain.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gl_rmain.c b/gl_rmain.c index a233953d..788d53ee 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -6145,10 +6145,12 @@ void gl_main_start(void) //r_texture_fogintensity = NULL; memset(&r_bloomstate, 0, sizeof(r_bloomstate)); memset(&r_waterstate, 0, sizeof(r_waterstate)); + r_glsl_permutation = NULL; memset(r_glsl_permutationhash, 0, sizeof(r_glsl_permutationhash)); Mem_ExpandableArray_NewArray(&r_glsl_permutationarray, r_main_mempool, sizeof(r_glsl_permutation_t), 256); glslshaderstring = NULL; #ifdef SUPPORTCG + r_cg_permutation = NULL; memset(r_cg_permutationhash, 0, sizeof(r_cg_permutationhash)); Mem_ExpandableArray_NewArray(&r_cg_permutationarray, r_main_mempool, sizeof(r_cg_permutation_t), 256); cgshaderstring = NULL; @@ -6196,6 +6198,14 @@ void gl_main_shutdown(void) //r_texture_fogintensity = NULL; memset(&r_bloomstate, 0, sizeof(r_bloomstate)); memset(&r_waterstate, 0, sizeof(r_waterstate)); + r_glsl_permutation = NULL; + memset(r_glsl_permutationhash, 0, sizeof(r_glsl_permutationhash)); + glslshaderstring = NULL; +#ifdef SUPPORTCG + r_cg_permutation = NULL; + memset(r_cg_permutationhash, 0, sizeof(r_cg_permutationhash)); + cgshaderstring = NULL; +#endif R_GLSL_Restart_f(); } -- 2.39.2