mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
pps_ts: avoid nullptr dereference
This commit is contained in:
parent
efb5f43980
commit
6c6489f7b3
1 changed files with 8 additions and 6 deletions
|
@ -103,12 +103,14 @@ public:
|
|||
|
||||
period = 1.0 / fSmps;
|
||||
|
||||
if (!strcmp(mode_str, "simple"))
|
||||
mode = Mode::SIMPLE;
|
||||
else if (!strcmp(mode_str, "horizon"))
|
||||
mode = Mode::HORIZON;
|
||||
else
|
||||
throw ConfigError(json, "node-config-hook-pps_ts-mode", "Unsupported mode: {}", mode_str);
|
||||
if (mode_str) {
|
||||
if (!strcmp(mode_str, "simple"))
|
||||
mode = Mode::SIMPLE;
|
||||
else if (!strcmp(mode_str, "horizon"))
|
||||
mode = Mode::HORIZON;
|
||||
else
|
||||
throw ConfigError(json, "node-config-hook-pps_ts-mode", "Unsupported mode: {}", mode_str);
|
||||
}
|
||||
|
||||
state = State::PARSED;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue