Merge branch 'tracerestrict-sx' into jgrpp
This commit is contained in:
@@ -1013,17 +1013,17 @@ CommandCost CmdProgramSignalTraceRestrictProgMgmt(TileIndex tile, DoCommandFlag
|
||||
switch (type) {
|
||||
case TRDCT_PROG_COPY: {
|
||||
TraceRestrictRemoveProgramMapping(self);
|
||||
TraceRestrictProgram *prog = GetTraceRestrictProgram(self, true);
|
||||
if (!prog) {
|
||||
// allocation failed
|
||||
return CMD_ERROR;
|
||||
}
|
||||
|
||||
TraceRestrictProgram *source_prog = GetTraceRestrictProgram(source, false);
|
||||
if (source_prog) {
|
||||
if (source_prog && !source_prog->items.empty()) {
|
||||
TraceRestrictProgram *prog = GetTraceRestrictProgram(self, true);
|
||||
if (!prog) {
|
||||
// allocation failed
|
||||
return CMD_ERROR;
|
||||
}
|
||||
prog->items = source_prog->items; // copy
|
||||
prog->Validate();
|
||||
}
|
||||
prog->Validate();
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user