From 4e2403859a8fc8ff54892ac4cc680c84b7902ab8 Mon Sep 17 00:00:00 2001 From: Marco Biasini <marco.biasini@unibas.ch> Date: Fri, 15 Jun 2012 17:50:37 +0200 Subject: [PATCH] guard access of name --- modules/conop/src/compound_lib.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/conop/src/compound_lib.cc b/modules/conop/src/compound_lib.cc index 215b75ad5..c423e0a12 100644 --- a/modules/conop/src/compound_lib.cc +++ b/modules/conop/src/compound_lib.cc @@ -359,7 +359,9 @@ CompoundPtr CompoundLib::FindCompound(const String& id, } if (name_available_) { const char* name=reinterpret_cast<const char*>(sqlite3_column_text(stmt, 7)); - compound->SetName(name); + if (name) { + compound->SetName(name); + } } // Load atoms and bonds this->LoadAtomsFromDB(compound, pk); -- GitLab