Fix uninitialized memory access if a FShaderProgram is destroyed without being fully compiled and linked

This commit is contained in:
Magnus Norddahl 2016-08-26 01:40:28 +02:00
commit b68bbaf617
2 changed files with 10 additions and 0 deletions

View file

@ -6,6 +6,7 @@
class FShaderProgram
{
public:
FShaderProgram();
~FShaderProgram();
enum ShaderType
@ -30,6 +31,9 @@ public:
static void PatchFragShader(FString &code);
private:
FShaderProgram(const FShaderProgram &) = delete;
FShaderProgram &operator=(const FShaderProgram &) = delete;
static FString PatchShader(ShaderType type, const FString &code, const char *defines, int maxGlslVersion);
static void PatchCommon(FString &code);