13
0

Shuttle Surface: Fix uninitialized argument in case of incomplete state

This commit is contained in:
Robin Gareus 2019-08-20 04:17:59 +02:00
parent f5330d763a
commit 6227dd5b04
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -194,10 +194,15 @@ ContourDesignControlProtocol::set_state (const XMLNode& node, int version)
_button_actions[i] = b;
} else {
double value;
child->get_property(X_("value"), value);
string s;
child->get_property(X_("unit"), s);
if (!child->get_property(X_("value"), value)) {
continue;
}
if (!child->get_property(X_("unit"), s)) {
continue;
}
JumpUnit unit;
if (s == X_("seconds")) {
unit = SECONDS;