DXGL r385 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r384‎ | r385 | r386 >
Date:00:29, 12 June 2013
Author:admin
Status:new
Tags:
Comment:
Fix dynamic allocation of shader array.
Modified paths:
  • /ddraw/shadergen.cpp (modified) (history)

Diff [purge]

Index: ddraw/shadergen.cpp
@@ -127,8 +127,9 @@
128128 if(genshaders[i].shader.vs) glDeleteShader(genshaders[i].shader.vs);
129129 if(genshaders[i].shader.fsrc) delete genshaders[i].shader.fsrc;
130130 if(genshaders[i].shader.vsrc) delete genshaders[i].shader.vsrc;
131 - if(genshaders) free(genshaders);
132131 }
 132+ if(genshaders) free(genshaders);
 133+ genshaders = NULL;
133134 current_genshader = -1;
134135 shadercount = 0;
135136 genindex = 0;