Browse Source

Delete shader in case compilation fails

pull/5005/head
Ray 5 months ago
parent
commit
b677376088
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/rlgl.h

+ 3
- 0
src/rlgl.h View File

@ -4178,6 +4178,9 @@ unsigned int rlCompileShader(const char *shaderCode, int type)
RL_FREE(log);
}
// Unload object allocated by glCreateShader(),
// despite failing in the compilation process
glDeleteShader(shader);
shader = 0;
}
else

Loading…
Cancel
Save