From ca7611dcf999f55ea17d5cd4f53e5a836ec51cd1 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 4 Mar 2023 14:59:02 +0000 Subject: RailVehicleClass texture might be null --- game/vehicles/railVehicleClass.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'game/vehicles/railVehicleClass.cpp') 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 & 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]); -- cgit v1.2.3