Skip to content

Commit

Permalink
Fix a crash when assigning "-" to the "model" spawnarg of a light
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Apr 27, 2020
1 parent 40c73d7 commit f5150e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion radiant/render/backend/OpenGLShader.cpp
Expand Up @@ -504,7 +504,8 @@ void OpenGLShader::constructEditorPreviewPassFromMaterial()
OpenGLState& previewPass = appendDefaultPass();

// Render the editor texture in legacy mode
previewPass.texture0 = _material->getEditorImage()->getGLTexNum();
auto editorTex = _material->getEditorImage();
previewPass.texture0 = editorTex ? editorTex->getGLTexNum() : 0;

previewPass.setRenderFlag(RENDER_FILL);
previewPass.setRenderFlag(RENDER_TEXTURE_2D);
Expand Down

0 comments on commit f5150e6

Please sign in to comment.