diff --git a/src/tbtr_template_gui_create.cpp b/src/tbtr_template_gui_create.cpp index 741b840716..79f8a808af 100644 --- a/src/tbtr_template_gui_create.cpp +++ b/src/tbtr_template_gui_create.cpp @@ -244,7 +244,9 @@ public: break; } case TCW_REFIT: { - ShowVehicleRefitWindow(virtual_train, INVALID_VEH_ORDER_ID, this, false, true); + if (virtual_train != NULL) { + ShowVehicleRefitWindow(virtual_train, INVALID_VEH_ORDER_ID, this, false, true); + } break; } }