summaryrefslogtreecommitdiff
path: root/game/vehicles
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-03-04 14:59:02 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-03-04 14:59:02 +0000
commitca7611dcf999f55ea17d5cd4f53e5a836ec51cd1 (patch)
tree62fc6e138ff7a9782148616d2d3072fb4d41e4ec /game/vehicles
parentSupport and load factory asset directly into a RailVehicleClass instance (diff)
downloadilt-ca7611dcf999f55ea17d5cd4f53e5a836ec51cd1.tar.bz2
ilt-ca7611dcf999f55ea17d5cd4f53e5a836ec51cd1.tar.xz
ilt-ca7611dcf999f55ea17d5cd4f53e5a836ec51cd1.zip
RailVehicleClass texture might be null
Diffstat (limited to 'game/vehicles')
-rw-r--r--game/vehicles/railVehicleClass.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/game/vehicles/railVehicleClass.cpp b/game/vehicles/railVehicleClass.cpp
index 7052396..c0740cc 100644
--- a/game/vehicles/railVehicleClass.cpp
+++ b/game/vehicles/railVehicleClass.cpp
@@ -53,7 +53,9 @@ RailVehicleClass::render(
const SceneShader & shader, const Location & location, const std::array<Location, 2> & bl) const
{
shader.basic.use(location);
- texture->bind();
+ if (texture) {
+ texture->bind();
+ }
bodyMesh->Draw();
for (auto b = 0U; b < bogies.size(); ++b) {
shader.basic.setModel(bl[b]);