diff options
author | bubnikv <bubnikv@gmail.com> | 2017-10-02 18:35:00 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2017-10-02 18:35:00 +0300 |
commit | 84d4bf8fdb07b12754e8303c99cf8ff54ecac037 (patch) | |
tree | 32c04f783fdad3e361858954e9653481d09e10f2 /xs/src/libslic3r/Config.cpp | |
parent | b1e3b0cdf9660961d291cfde508c7bcf3b9dd22b (diff) |
Load presets into the new C++ class.
Diffstat (limited to 'xs/src/libslic3r/Config.cpp')
-rw-r--r-- | xs/src/libslic3r/Config.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xs/src/libslic3r/Config.cpp b/xs/src/libslic3r/Config.cpp index 4ece56499..db46c7d59 100644 --- a/xs/src/libslic3r/Config.cpp +++ b/xs/src/libslic3r/Config.cpp @@ -188,7 +188,8 @@ void ConfigBase::apply(const ConfigBase &other, const t_config_option_keys &keys continue; } // not the most efficient way, but easier than casting pointers to subclasses - if (! my_opt->deserialize(other.option(key)->serialize())) + const ConfigOption *other_opt = other.option(key); + if (other_opt != nullptr && ! my_opt->deserialize(other_opt->serialize())) CONFESS((std::string("Unexpected failure when deserializing serialized value for ") + key).c_str()); } } |