From 31e1ae23f29ce8cff695b4b2779e49208c77454d Mon Sep 17 00:00:00 2001 From: kishan_grimout Date: Sat, 23 May 2015 16:50:24 +0200 Subject: [PATCH] fix crash when a shader fails to build --- .../src/3d/driver/opengl/driver_opengl_pixel_program.cpp | 2 +- .../src/3d/driver/opengl/driver_opengl_vertex_program.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_pixel_program.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_pixel_program.cpp index cbc427dab..dd66328e9 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_pixel_program.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_pixel_program.cpp @@ -122,7 +122,7 @@ bool CDriverGL::compilePixelProgram(NL3D::CPixelProgram *program) { delete drvInfo; program->m_DrvInfo = NULL; - _GPUPrgDrvInfos.erase(it); + //_GPUPrgDrvInfos.erase(it); // not needed as ~IProgramDrvInfos() already does it return false; } } diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp index 22bc5ff5a..1c06ece9a 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp @@ -178,7 +178,7 @@ bool CDriverGL::compileNVVertexProgram(CVertexProgram *program) // Setup not ok delete drvInfo; program->m_DrvInfo = NULL; - _GPUPrgDrvInfos.erase(it); + //_GPUPrgDrvInfos.erase(it); // not needed as ~IProgramDrvInfos() already does it return false; } @@ -1568,7 +1568,7 @@ bool CDriverGL::compileARBVertexProgram(NL3D::CVertexProgram *program) { delete drvInfo; program->m_DrvInfo = NULL; - _GPUPrgDrvInfos.erase(it); + //_GPUPrgDrvInfos.erase(it); // not needed as ~IProgramDrvInfos() already does it return false; } @@ -1695,7 +1695,7 @@ bool CDriverGL::compileEXTVertexShader(CVertexProgram *program) { delete drvInfo; program->m_DrvInfo = NULL; - _GPUPrgDrvInfos.erase(it); + //_GPUPrgDrvInfos.erase(it); // not needed as ~IProgramDrvInfos() already does it return false; }