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,6 +747,7 @@ void annotateDSSP(cif::datablock &db, const dssp &dssp, bool writeOther, bool wr ...@@ -747,6 +747,7 @@ void annotateDSSP(cif::datablock &db, const dssp &dssp, bool writeOther, bool wr
{ {
using namespace std::literals; using namespace std::literals;
if (db.get_validator() != nullptr) {
auto &validator = const_cast<cif::validator &>(*db.get_validator()); auto &validator = const_cast<cif::validator &>(*db.get_validator());
if (validator.get_validator_for_category("dssp_struct_summary") == nullptr) if (validator.get_validator_for_category("dssp_struct_summary") == nullptr)
{ {
...@@ -754,6 +755,7 @@ void annotateDSSP(cif::datablock &db, const dssp &dssp, bool writeOther, bool wr ...@@ -754,6 +755,7 @@ void annotateDSSP(cif::datablock &db, const dssp &dssp, bool writeOther, bool wr
if (dssp_extension) if (dssp_extension)
cif::extend_dictionary(validator, *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