Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2017-10-02 18:35:00 +0300
committerbubnikv <bubnikv@gmail.com>2017-10-02 18:35:00 +0300
commit84d4bf8fdb07b12754e8303c99cf8ff54ecac037 (patch)
tree32c04f783fdad3e361858954e9653481d09e10f2 /xs/src/libslic3r/Config.cpp
parentb1e3b0cdf9660961d291cfde508c7bcf3b9dd22b (diff)
Load presets into the new C++ class.
Diffstat (limited to 'xs/src/libslic3r/Config.cpp')
-rw-r--r--xs/src/libslic3r/Config.cpp3
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());
}
}