diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-03-04 14:59:02 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-03-04 14:59:02 +0000 |
commit | ca7611dcf999f55ea17d5cd4f53e5a836ec51cd1 (patch) | |
tree | 62fc6e138ff7a9782148616d2d3072fb4d41e4ec | |
parent | Support and load factory asset directly into a RailVehicleClass instance (diff) | |
download | ilt-ca7611dcf999f55ea17d5cd4f53e5a836ec51cd1.tar.bz2 ilt-ca7611dcf999f55ea17d5cd4f53e5a836ec51cd1.tar.xz ilt-ca7611dcf999f55ea17d5cd4f53e5a836ec51cd1.zip |
RailVehicleClass texture might be null
-rw-r--r-- | game/vehicles/railVehicleClass.cpp | 4 |
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]); |