Commit 2830267a by Maarten L. Hekkelman Committed by GitHub

Merge pull request #88 from Augustin-Zidek/patch-1

Don't try to validate in annotateDSSP when the validator is not set
parents 778d0ad5 3d835b8a
...@@ -747,12 +747,14 @@ void annotateDSSP(cif::datablock &db, const dssp &dssp, bool writeOther, bool wr ...@@ -747,12 +747,14 @@ void annotateDSSP(cif::datablock &db, const dssp &dssp, bool writeOther, bool wr
{ {
using namespace std::literals; using namespace std::literals;
auto &validator = const_cast<cif::validator &>(*db.get_validator()); if (db.get_validator() != nullptr) {
if (validator.get_validator_for_category("dssp_struct_summary") == nullptr) auto &validator = const_cast<cif::validator &>(*db.get_validator());
{ if (validator.get_validator_for_category("dssp_struct_summary") == nullptr)
auto dssp_extension = cif::load_resource("dssp-extension.dic"); {
if (dssp_extension) auto dssp_extension = cif::load_resource("dssp-extension.dic");
cif::extend_dictionary(validator, *dssp_extension); if (dssp_extension)
cif::extend_dictionary(validator, *dssp_extension);
}
} }
if (dssp.empty()) if (dssp.empty())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment