mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-24 13:21:23 +01:00
Do not crash on turnouts or turntables without description
This commit is contained in:
parent
c336ab0bb4
commit
ca380d11dc
@ -334,12 +334,14 @@ if (compileFeatures & FEATURE_SIGNAL) {
|
||||
|
||||
void RMFT2::setTurnoutHiddenState(Turnout * t) {
|
||||
// turnout descriptions are in low flash F strings
|
||||
t->setHidden(GETFLASH(getTurnoutDescription(t->getId()))==0x01);
|
||||
const FSH *desc = getTurnoutDescription(t->getId());
|
||||
if (desc) t->setHidden(GETFLASH(desc)==0x01);
|
||||
}
|
||||
|
||||
#ifndef IO_NO_HAL
|
||||
void RMFT2::setTurntableHiddenState(Turntable * tto) {
|
||||
tto->setHidden(GETFLASH(getTurntableDescription(tto->getId()))==0x01);
|
||||
const FSH *desc = getTurntableDescription(tto->getId());
|
||||
if (desc) tto->setHidden(GETFLASH(desc)==0x01);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user