summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/depot_gui.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp
index 4a55985ab..9ec0f0c9f 100644
--- a/src/depot_gui.cpp
+++ b/src/depot_gui.cpp
@@ -1001,6 +1001,8 @@ void ShowDepotWindow(TileIndex tile, VehicleType type)
w = AllocateWindowDescFront<DepotWindow>(&_aircraft_depot_desc, tile); break;
}
+ if (w == NULL) return;
+
w->caption_color = GetTileOwner(tile);
w->CreateDepotListWindow(type);
}