protect from string destruction

This commit is contained in:
rdb 2010-10-30 19:36:03 +00:00
parent d465c56449
commit c5f2020858

View File

@ -1032,7 +1032,8 @@ glsl_compile_entry_point(GSG *gsg, Shader::ShaderType type) {
if (!handle) { if (!handle) {
return 0; 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->_glShaderSource(handle, 1, &text, NULL);
gsg->_glCompileShader(handle); gsg->_glCompileShader(handle);
GLint status; GLint status;