Skip to content

Commit

Permalink
lightpreview: Don't reference null texture ptr.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsvensson committed Dec 6, 2023
1 parent 4479214 commit 83b3104
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lightpreview/glview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1301,16 +1301,16 @@ void GLView::renderBSP(const QString &file, const mbsp_t &bsp, const bspxentries
if (!texture) {
logging::print("warning, couldn't locate {}", k.texname);
qtexture = placeholder_texture;
}

if (!texture->width || !texture->height) {
logging::print("warning, empty texture {}", k.texname);
qtexture = placeholder_texture;
}
} else {
if (!texture->width || !texture->height) {
logging::print("warning, empty texture {}", k.texname);
qtexture = placeholder_texture;
}

if (texture->pixels.empty()) {
logging::print("warning, empty texture pixels {}", k.texname);
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();
Expand Down

0 comments on commit 83b3104

Please sign in to comment.