mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 09:23:03 -04:00
protect from string destruction
This commit is contained in:
parent
d465c56449
commit
c5f2020858
@ -1032,7 +1032,8 @@ glsl_compile_entry_point(GSG *gsg, Shader::ShaderType type) {
|
||||
if (!handle) {
|
||||
return 0;
|
||||
}
|
||||
const char* text = _shader->get_text(type).c_str();
|
||||
string text_str = _shader->get_text(type);
|
||||
const char* text = text_str.c_str();
|
||||
gsg->_glShaderSource(handle, 1, &text, NULL);
|
||||
gsg->_glCompileShader(handle);
|
||||
GLint status;
|
||||
|
Loading…
x
Reference in New Issue
Block a user