lightpreview: fix crash on Q1 maps with missing textures

This commit is contained in:
Eric Wasylishen 2023-08-30 23:08:36 -06:00
parent b893e67309
commit b8132be96e
1 changed files with 5 additions and 0 deletions

View File

@ -1224,6 +1224,11 @@ void GLView::renderBSP(const QString &file, const mbsp_t &bsp, const bspxentries
qtexture = placeholder_texture;
}
if (texture->pixels.empty()) {
logging::print("warning, empty texture pixels {}", k.texname);
qtexture = placeholder_texture;
}
const size_t dc_first_index = indexBuffer.size();
if (k.program == m_skybox_program) {